|
It does restrict some functionality...
to describe what's happening in HTTPService - an
underlying URLLoader returns your XML data as a String. This String is then
turned into XML and then if the resultFormat is left as the default setting of
"object" it will convert this XML into an ActionScript Object graph. If
makeObjectsBindable is false then Objects will not be wrapped
by mx.utils.ObjectProxy and Arrays will not be wrapped by
mx.collections.ArrayCollection and as such property change events will not be
dispatched when the object graph is modified, which will mean if the data is
used as a data provider to a UI component it won't reflect changes as the data
is modified.
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.ArrayCollection;
import
mx.utils.ObjectProxy;
...
private function
decode(data:XML):Object
{ var result:Object; if
(data.elements().length() == 0)
{ result = data.text().toXMLString(); } else { result = {}; result = new ObjectProxy(result); 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(existing).addItem(part);
else
{
var temp:ArrayCollection = new ArrayCollection();
temp.addItem(existing);
temp.addItem(part);
result[name] = temp;
}
} else { result[name] = part; } } } return
result; } From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Flex Learner 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 __,_._,___ |
- RE: [flexcoders] Stack Overflow in swf to swf include Peter Farland
- Re: [flexcoders] Stack Overflow in swf to swf include Flex Learner
- RE: [flexcoders] Stack Overflow in swf to swf inclu... Peter Farland
- RE: [flexcoders] Stack Overflow in swf to swf i... Peter Farland

