Can I
04-29-2007, 08:58 PM
hi,
it is written in flex dev guide that to bind lastResult to XMLListCollection you would do sth like this:
<mx:XMLListCollection id="xc" source="{employeeWS.getList.lastResult}"/>
so I try...
113.xml:
<?xml version="1.0" encoding="utf-8"?>
<mindmap name="113">
<branch name="pierwsza gałąź">
<branch name="podgałąź" />
</branch>
<branch name="druga gałąź"/>
</mindmap>
and app:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
creationComplete="mindmapService.send()">
<mx:HTTPService id="mindmapService" url="mindmaps/113.xml"
resultFormat="e4x" showBusyCursor="true" />
<mx:XMLList id="xmlList">
<mindmap name="113">
<branch name="pierwsza gałąź">
<branch name="podgałąź" />
</branch>
<branch name="druga gałąź"/>
</mindmap>
</mx:XMLList>
<mx:XMLListCollection id="xmlListCollection" source="{ mindmapService.lastResult }" />
<mx:Tree dataProvider="{ xmlListCollection }" labelField="@name" width="200" />
</mx:Application>
but I'm getting
1118: Implicit coercion of a value with static type Object to a possibly unrelated type XMLList
error
so how to bind this loaded data?
it is written in flex dev guide that to bind lastResult to XMLListCollection you would do sth like this:
<mx:XMLListCollection id="xc" source="{employeeWS.getList.lastResult}"/>
so I try...
113.xml:
<?xml version="1.0" encoding="utf-8"?>
<mindmap name="113">
<branch name="pierwsza gałąź">
<branch name="podgałąź" />
</branch>
<branch name="druga gałąź"/>
</mindmap>
and app:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"
creationComplete="mindmapService.send()">
<mx:HTTPService id="mindmapService" url="mindmaps/113.xml"
resultFormat="e4x" showBusyCursor="true" />
<mx:XMLList id="xmlList">
<mindmap name="113">
<branch name="pierwsza gałąź">
<branch name="podgałąź" />
</branch>
<branch name="druga gałąź"/>
</mindmap>
</mx:XMLList>
<mx:XMLListCollection id="xmlListCollection" source="{ mindmapService.lastResult }" />
<mx:Tree dataProvider="{ xmlListCollection }" labelField="@name" width="200" />
</mx:Application>
but I'm getting
1118: Implicit coercion of a value with static type Object to a possibly unrelated type XMLList
error
so how to bind this loaded data?