--- In flexcoders@yahoogroups.com, Luis Eduardo <[EMAIL PROTECTED]> wrote:
>
>
>
> hello people,
>
> i am adding one XML item at one XMLListCollection but the
> collectionChange event dont fire.
>
> i am using the follow code:
>
> var xn:XML = new XML();
> xn = <TipoVeiculo Id="" Nome={edtNome.text}
> Descricao={edtDescricao.text}/>;
> XMLLC.addItem(xn);
>
> the XMLListCollection was defined in this way:
>
> <mx:XMLListCollection id="XMLLC"
> collectionChange="Alert.show('collectionChange')"/>
>
> any ideas? is this a bug? or only the arraycollection can actually
> fire this event?
>
>
> []'s,
>
> Luís Eduardo.
>
>
>
>
>
> _______________________________________________________
> Você quer respostas para suas perguntas? Ou você sabe muito e quer compartilhar seu conhecimento? Experimente o Yahoo! Respostas !
> http://br.answers.yahoo.com/
>
Hi, well this isn't a bug at all, maybe some more tutorials could help folks like you and me.In the meantime read through the ref. doc...

So here is a little working snippet:

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

<mx:Script>
  <![CDATA[
   
 import mx.collections.XMLListCollection;
 import mx.controls.Alert;
]]>
</mx:Script>

mx:XMLList id="xnList">
<TipoVeiculo Id="1" Nome="{edtNome.text}" Descricao="{edtDescricao.text}"/>
</mx:XMLList>

<mx:XMLListCollection id="XMLLC"  source="{xnList}" />

<mx:Panel title="XMLListCollection Example" height="75%" width="75%"  paddingTop="10" paddingLeft="10">

<mx:TextInput id="edtNome"  text="Seat Toledo" />
<mx:TextInput id="edtDescricao" text="It rocks"/>

<mx:Button label="send" click="Alert.show(XMLLC.toXMLString())"/>

 </mx:Panel>

</mx:Application>

Adios, Bela

__._,_.___

--
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
Software development tool Software development Software development services
Home design software Software development company

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

__,_._,___

Reply via email to