Archive for the 'Flex 2.0' Category
Another Tricky Flex 2 Error
Ran into another Flex 2 error the other day that’s again not crystal clear about what it’s trying to tell you. This one is:
Invalid Embed directive in stylesheet - can’t resolve source ‘Embed(source = “assets/my_picture.png”)’
Here’s the source:
1 2 3 4 5 6 | <mx:style> .customVideoTree { defaultLeafIcon:Embed(source="assets/ds-qhv-film-icon.png"); } </mx:style> |
This one is pretty clear in hindsight, but care to guess what that error up there means to say? My initial thinking was that it was a syntax error with the Embed directive, but nope, the $25,000 answer is. . .
file not found
Now you know what can’t resolve source means, which of course makes perfect sense now. . .but sure tripped my up on the spot.
LB
1 commentFlex 2 Strange Error
I ran into an error while working on a Flex2 application this morning. The error made zero sense in the context, and I wasn’t able to find anything that explained it (reasonably) via google. So, here’s what I found the hard way :
The error was:
[RPC Fault faultString=”Error #2070: Security sandbox violation: caller cannot access Stage owned by .” faultCode=”Client.CouldNotDecode” faultDetail=”null”]
Here’s some sample code that will replicate the error:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | <mx:application xmlns:mx="http://www.adobe.com/2006/mxml" width="800" height="600"> initialize="e4xService.send()"> <mx:script> <!--[CDATA[ public function handleHttpResult(event:Event):void { } ]]--> </mx:script> <mx:httpservice id="e4xService" url="assets/videos.xml" result="handleHttpResult(event)"> </mx:httpservice> </mx:application> |
And here’s some example XML for the “assets/videos.xml” file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | <applications> <application label="Web Application"> <category label="Upload Manager Set Up"> <category label="Basic File Operations"> <subcategory label="Uploading"> <subcategory label="Downloading"> <subcategory label="Moving and Cut Paste"> <subcategory label="Deleting and Recovering"> <subcategory label="Creating Folders"> <subcategory label="Setting View Mode"> </subcategory> <category label="Sharing"> <subcategory label="Shared Folders"> <subcategory label="Shared Files"> <subcategory label="Temporary Passwords"> </subcategory> <category label="Address Book"> <category label="Billing"> <category label="Sub-Accounts"> <category label="Search"> <category label="Web Import (Advanced)"> <category label="Multimedia"> </category> <application label="Desktop Application"></application> <category label="Desktop Application Install"> <category label="Basic File Operations"> <subcategory label="Uploading"> <subcategory label="Downloading"> <subcategory label="Moving and Cut Paste"> <subcategory label="Deleting and Recovering"> </subcategory> <category label="Sharing"> <subcategory label="Shared Folders"> <subcategory label="Shared Files"> </subcategory> <category label="Backups"> <category label="Syncing"> </category> </category> </subcategory></category></subcategory></subcategory></subcategory></category></category></category></category></category></category></category></subcategory></subcategory></category></subcategory></subcategory></subcategory></subcategory></subcategory></category></category></application></applications> |
Line 25 had some poorly formatted XML; “<application label=”Desktop Application”/>” (Closing the tag while it had children). This was my problem.
So, the short answer is: If you see this problem and you’re remotely loading an xml file, go over your xml with a fine toothed comb. The text of the error doesn’t make a lot of sense in context.
Hope that helps!
LB
6 comments