Adobe Dreamweaver Forums



Last 10 THreads :         Director or Flash? (Last Post : Sean Wilson - Replies : 1 - Views : 2 )           »          DW8 Activation not working (Last Post : moonliner - Replies : 0 - Views : 1 )           »          Creating a boundry in the stage... (Last Post : Rob Dillon - Replies : 1 - Views : 2 )           »          Re: Mouse capture won't activate (Last Post : robertnagle - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          help! my FB3 has gone insane! (Last Post : peteandrus - Replies : 0 - Views : 1 )           »          How come the html is being displayed, and not the link (Last Post : Skaterstu - Replies : 0 - Views : 1 )           »          Another way to accomplish this (Last Post : Andy-K - Replies : 2 - Views : 3 )           »          HELP! Cannot upload files in DW CS4 (Last Post : dan@hoppernet.org - Replies : 6 - Views : 7 )           »          Adobe Flash 10 kills Wimpy (Last Post : m77ty8uu - Replies : 32 - Views : 208 )           »         


Home Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
User Info Statistics
Go Back   Adobe Dreamweaver Forums > Other Macromedia/Adobe Products > Flex
 
Tags: ,



Reply
  #1 (permalink)  
Old 08-31-2008, 10:19 PM
cesaregb
 
Posts: n/a
Diggs:
Default problem with arrayCollection

Hi all

I have a little problem with an array collection

the thing is that Im working with httpservices and this bring you and xml file
and i have no problem when im using this xml

<object>
<item>
<id>1</id>
<name>MOSTRADOR</name>
</item>
<item>
<id>2</id>
<name>CAJERA</name>
</item>
<item><id>3</id>
<name>FINANZAS</name>
</item>
</object>

but for example when im using

<object>
<item>
<id>1</id>
<name>info </name>
</item>
</object>

when i assign the information to the ArrayCollection variable i don't know why
the result of this is null

im assigning this file like this
mySubmenus = e.result.object.item as ArrayCollection;

and this is the code of the httpservice

<mx:HTTPService id="myService"
url="http://mypage/bringInfo.php"
showBusyCursor="true"
result="showSuccess(event)"
fault="showError(event)"
/>

anyone can help me on this one, how should i assign this file this xml

well i hope anyone can help me regards




Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-02-2008, 09:16 PM
cesaregb
 
Posts: n/a
Diggs:
Default Re: problem with arrayCollection

anyone can help me on this one ??

im kain of upset cause this i dont know why

how should i do this ??

Reply With Quote
  #3 (permalink)  
Old 09-02-2008, 11:47 PM
Amy Blankenship
 
Posts: n/a
Diggs:
Default Re: problem with arrayCollection


"cesaregb" <webforumsuser@macromedia.com> wrote in message
news:g9f1e9$c49$1@forums.macromedia.com...
> Hi all
>
> I have a little problem with an array collection
>
> the thing is that Im working with httpservices and this bring you and xml
> file
> and i have no problem when im using this xml
>
> <object>
> <item>
> <id>1</id>
> <name>MOSTRADOR</name>
> </item>
> <item>
> <id>2</id>
> <name>CAJERA</name>
> </item>
> <item><id>3</id>
> <name>FINANZAS</name>
> </item>
> </object>
>
> but for example when im using
>
> <object>
> <item>
> <id>1</id>
> <name>info </name>
> </item>
> </object>
>
> when i assign the information to the ArrayCollection variable i don't know
> why
> the result of this is null
>
> im assigning this file like this
> mySubmenus = e.result.object.item as ArrayCollection;


I think e.result will already contain the object level, if the format is
e4X. If you're using the default Object format, I'm not so sure. I think
when it comes back as Object and there's only one Object, for some reason it
is null. You could try switching your result format to e4x and then use
something like this:

var myXMLList:XMLList=e.result.child('item');

var myXMLListCollection:XMLListCollection=new XMLListCollection(myXMLList);

mySubmenus - new ArrayCollection(myXMLListCollection.toArray());

Though you might be better off just using the XMLListCollection.

HTH;

Amy


Reply With Quote


  #4 (permalink)  
Old 09-05-2008, 07:14 PM
cesaregb
 
Posts: n/a
Diggs:
Default Re: problem with arrayCollection

Thanks a lot this did work

well i think i've to read a little more about this

regards
Cesar
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
All times are GMT. The time now is 02:26 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
Inactive Reminders By Mished.co.uk