[flexcoders] event passing when source/destination are on different parent bubbling chains?

2009-02-18 Thread Mic
In an app that has many parent and child components, how does one
communicate across bubbling chains? I need to go up from a buried
child component source to its parent, across to another of the
parent's children, and down that chain to a child destination. Can
this be done in Flex, or do I create my own event subscription
component where anybody from anywhere can subscribe with a
self.reference? TIA,

Mic. 



RE: [flexcoders] event passing when source/destination are on different parent bubbling chains?

2009-02-18 Thread Ryan Graham

 In an app that has many parent and child components, how does one
 communicate across bubbling chains? I need to go up from a buried
 child component source to its parent, across to another of the
 parent's children, and down that chain to a child destination. Can
 this be done in Flex, or do I create my own event subscription
 component where anybody from anywhere can subscribe with a
 self.reference?

 

Sounds like you're describing the controller's function in MVC
architecture. Usually an event is triggered by some sort of user
interaction in hopes of changing the state of the application in some
way.  If you store the state in some sort of centralized model
somewhere, the controller can react to user events, update the model's
state properties accordingly, and let any part of the view that is bound
to the model update itself on property change. Is that the setup you are
running right now? Are you passing data with this event that other
components need?

 

HTH,

Ryan



This message is private and confidential. If you have received it in error, 
please notify the sender and remove it from your system.