Are you waiting until after the init() function has completed in CambioPasswordForm? I believe this is when the variables are assigned their passed-in values, so if you are accessing them before that they will be undefined.
Doug --- In flexcoders@yahoogroups.com, "RAMOS CARDONA JESUS SALVADOR" <[EMAIL PROTECTED]> wrote: > > This does not work wither. Is this the best way to do this? Is there another way? What are the best practices for accomplishing this? > > -----Mensaje original----- > De: Matt Chotin [mailto:[EMAIL PROTECTED] > Enviado el: MiƩrcoles, 15 de Marzo de 2006 12:54 a.m. > Para: flexcoders@yahoogroups.com > Asunto: RE: [flexcoders] Flex 1.5: Passing selected data to a popup > > I thought what you did might work too. You could declare pop as a CambioPasswordForm (instead of TitleWindow) and then on the next line assign pop.dataItem? > > Matt > > _____ > > From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of RAMOS CARDONA JESUS SALVADOR > Sent: Tuesday, March 14, 2006 8:27 PM > To: flexcoders@yahoogroups.com > Subject: [flexcoders] Flex 1.5: Passing selected data to a popup > > Hi all. > > Is there a way in which I can pass data from a grid to a popped up TitleWindow? > > This is the code that pops the TWindow: > > private function showCambioPassword(Void):Void { > var pop:TitleWindow = TitleWindow (PopUpManager.createPopUp(this, CambioPasswordForm, true, {dataItem:usuarioSeleccionado, style:this, owner:this})); > pop.centerPopUp(); > } > > This function is called when a button is pressed (which, in turn, enables itself when the data grid has a selected item). > > The variable 'usuarioSeleccionado' is a previously setted variable of type 'UsuarioExternoImpl' in my class. > > The 'CambioPasswordForm' is a Canvas that contains the rest of the components required by the interface. > > I believed that the init object at the end of the createPopUp method could contain variables that were passed to the CambioPasswordForm component, and as such I could manipulate the data contained in them in the popped-up window. I tried this with this code: > > class com.bursatec.seguridad.presentation.views.usuarios.CambioPasswordForm extends TitleWindow { > var dataItem:UsuarioExternoImpl; > ... > ... > } > > I thought that the matching dataItem both in the init object in the createPopUp method would set it to the proper value, and thus could access it from my CambioPasswordForm component, but this did not work. > > How can I accomplish this? > > Please help. > > J. > > > > -- > 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 > > Web <http://groups.yahoo.com/gads? t=ms&k=Web+site+design+development&w1=Web+site+design+development&w2= Computer+software+development&w3=Software+design+and+development&w4=M acromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig=L -4QTvxB_quFDtMyhrQaHQ> site design development > Computer <http://groups.yahoo.com/gads? t=ms&k=Computer+software+development&w1=Web+site+design+development&w 2=Computer+software+development&w3=Software+design+and+development&w4 =Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.sig =lvQjSRfQDfWudJSe1lLjHw> software development > Software <http://groups.yahoo.com/gads? t=ms&k=Software+design+and+development&w1=Web+site+design+development &w2=Computer+software+development&w3=Software+design+and+development& w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166&.s ig=1pMBCdo3DsJbuU9AEmO1oQ> design and development > > Macromedia <http://groups.yahoo.com/gads? t=ms&k=Macromedia+flex&w1=Web+site+design+development&w2=Computer+sof tware+development&w3=Software+design+and+development&w4=Macromedia+fl ex&w5=Software+development+best+practice&c=5&s=166&.sig=OO6nPIrz7_EpZ I36cYzBjw> flex > Software <http://groups.yahoo.com/gads? t=ms&k=Software+development+best+practice&w1=Web+site+design+developm ent&w2=Computer+software+development&w3=Software+design+and+developme nt&w4=Macromedia+flex&w5=Software+development+best+practice&c=5&s=166 &.sig=f89quyyulIDsnABLD6IXIw> development best practice > > > _____ > > YAHOO! GROUPS LINKS > > * Visit your group "flexcoders <http://groups.yahoo.com/group/flexcoders> " on the web. > > * To unsubscribe from this group, send an email to: > [EMAIL PROTECTED] <mailto:flexcoders- [EMAIL PROTECTED]> > > * Your use of Yahoo! Groups is subject to the Yahoo! <http://docs.yahoo.com/info/terms/> Terms of Service. > > _____ > -- 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/ <*> 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/