Bubbling is helpful, because it decouples the structure of your components from the structure of your eventhandling. EG. an event emitter like a button can be nested into multiple containers but still the top container is able to receive the event.
Another nice example for bubbling is loading of swfs at runtime. Your loaded swfs don't need to know the structure of the loading party, but still are able to dispatch some event to a controller like component on top of it. But you have to be careful when using bubbling. The decoupling only works with one receiver. If you add listeners in between the emitter and the receiver, you are fixing this structure and the decoupling is gone. Cheers, Ralf. On 8/29/06, ben.clinkinbeard <[EMAIL PROTECTED]> wrote: > Any time you want to handle an event in an ancestor of where it > happened. Say you've got a DataGrid that uses a ComboBox as an > itemRenderer. You probably wouldn't want the logic that handles the > change event of the CB inside that itemRenderer component, you would > want it in the parent of the DataGrid, or higher up the chain even, > because thats probably where the data lives. Bubbling lets you do that. > > HTH, > Ben > > --- In [email protected], "lostinrecursion" <[EMAIL PROTECTED]> > wrote: > > > > Hi all, I understand the concept of bubbling and know what it does > > with no issue. But, for some reason I can't think of a practical > > application of it? > > > > Could someone just give me a brief example of when bubbling might be > > used in a real world app? > > > > I'd appreciate it. > > > > -Kenny > > > > > > > > > > -- > 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 > > > > > > > > -- Ralf Bokelberg <[EMAIL PROTECTED]> Flex & Flash Consultant based in Cologne/Germany -- 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/

