see bellow pls


--- In flexcoders@yahoogroups.com, "Igor Costa" <[EMAIL PROTECTED]> wrote:
>
> Does this compile?
> 
> 
> 
> On 10/24/06, 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/
> >  
> >
> 
> 
> 
> -- 
> ----------------------------
> Igor Costa
> www.igorcosta.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>

Bela







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 

Reply via email to