Hmm, on testing this code in your scenario I realized I can
reproduce the issue again that you described. It seems related to ObjectProxy's
use of the intrinsic Proxy class from ActionScript. If you could
avoid checking for existing properties and develop another way to detect what
needs to be an Array then you can avoid the bug... otherwise you will need to
avoid the use of ObjectProxy in this scenario for now.
Note the bug that was filed was 188654 if you need to refer
to it in the future.
Pete From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Farland Sent: Wednesday, October 18, 2006 9:51 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Stack Overflow in swf to swf include
It does restrict some functionality.
Another workaround for now is to do the decoding
yourself. You could either change the resultFormat attribute to E4X and then
process the XML structure into a tree of objects or specify a Function for the
xmlDecode property. Some code to demonstrate the general idea is
below:
import
mx.collections.
import
mx.utils.ObjectProx
...
private function
decode(data:
{ var result:Object; if
(data.elements(
{ result = data.text(). } else { result = {}; result = new ObjectProxy( var elements:XMLList = data.elements(
for each (var x:XML in
elements)
{ var part:Object = decode(x);
var name:String =
x.localName(
var existing:Object = result[name] if (existing != null) { if (existing is ArrayCollection)
ArrayCollection(
else
{
var temp:ArrayCollectio
temp.addItem(
temp.addItem(
result[name] = temp;
}
} else { result[name] = part; } } } return
result; } From: [EMAIL PROTECTED] Sent: Wednesday, October 18, 2006 2:25 AM To: [EMAIL PROTECTED] Subject: Re: [flexcoders] Stack Overflow in swf to swf include
Thanks Pete. Adding makeObjectsBinadble
<userPref>
<device>phone </device> </userPref> I'm curious to know how this is related to
the stack overflow. Does makeObjectsBinadble
-Joseph On 10/18/06, Peter
Farland <[EMAIL PROTECTED]
-- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
SPONSORED LINKS
Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe __,_._,___ |