[flexcoders] Inter - component communication
Hi everyone, I have 2 groups of nested components put in 2 separate containers in a ViewStack. The containers themselves are components too. The nesting structure is as shown: (Comp1-->Comp2-->Comp3) --> This group goes in container 1. (Comp4-->Comp5-->Comp6) --> This group goes in container 2. Container 1 is initially displayed by default. There is a datagrid residing in Comp3. Upon clicking on one of the rows, I need to display Container 2, pass some info from the grid to Comp6 in Container 2 & display the relevant details within Comp6. As far as displaying the second container is concerned, its done. But passing data to the nested component is getting difficult. How do I handle the above situation. Will event dispatching & listening help? Can someone please give me some idea or code snippets? Thanks... Robi -- 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/
Re: [flexcoders] Inter - component communication
hello,Robs perhaps you can use the absolute path. for example,assume Comp3 is a dataGrid,and Comp6 is a dataGrid,you can use "_root","_root" reference the deepest compenent.you can use like this in Comp6:."_root" is a word import from Flash. Good luck! === 2006-03-25 14:59:27 您在来信中写道:=== > >Hi everyone, >I have 2 groups of nested components put in 2 separate containers in a >ViewStack. The containers themselves are components too. The nesting >structure is as shown: >(Comp1-->Comp2-->Comp3) --> This group goes in container 1. >(Comp4-->Comp5-->Comp6) --> This group goes in container 2. > >Container 1 is initially displayed by default. There is a datagrid >residing in Comp3. Upon clicking on one of the rows, I need to display >Container 2, pass some info from the grid to Comp6 in Container 2 & >display the relevant details within Comp6. As far as displaying the >second container is concerned, its done. But passing data to the nested >component is getting difficult. >How do I handle the above situation. Will event dispatching & listening >help? Can someone please give me some idea or code snippets? > >Thanks... >Robi > > > > > >-- >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 > > > > > > > > = = = = = = = = = = = = = = = = = = = = snail in China [EMAIL PROTECTED] 2006-03-25 -- 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/
RE: [flexcoders] Inter - component communication
But do not use _root. It will probably not be supported forever, and the best Flex practice is to use mx.core.Application.application. Assign that to a variable if it is too long. Do not bind to this kind of reference, it is not reliable, but direct calls are fine. You can also pass references to one component into another component (including Application). This type of reference is safe to bind to. Consider locating your data in a central location, at or near the application scope to simplify your references. I can be more specific once you choose a reference architecrure/methodology. Tracy -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of snail Sent: Saturday, March 25, 2006 5:54 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Inter - component communication hello,Robs perhaps you can use the absolute path. for example,assume Comp3 is a dataGrid,and Comp6 is a dataGrid,you can use "_root","_root" reference the deepest compenent.you can use like this in Comp6:."_root" is a word import from Flash. Good luck! === 2006-03-25 14:59:27 您在来信中写道:=== > >Hi everyone, >I have 2 groups of nested components put in 2 separate containers in a >ViewStack. The containers themselves are components too. The nesting >structure is as shown: >(Comp1-->Comp2-->Comp3) --> This group goes in container 1. >(Comp4-->Comp5-->Comp6) --> This group goes in container 2. > >Container 1 is initially displayed by default. There is a datagrid >residing in Comp3. Upon clicking on one of the rows, I need to display >Container 2, pass some info from the grid to Comp6 in Container 2 & >display the relevant details within Comp6. As far as displaying the >second container is concerned, its done. But passing data to the nested >component is getting difficult. >How do I handle the above situation. Will event dispatching & listening >help? Can someone please give me some idea or code snippets? > >Thanks... >Robi > > > > > >-- >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 > > > > > > > > = = = = = = = = = = = = = = = = = = = = snail in China [EMAIL PROTECTED] 2006-03-25 -- 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 -- 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/