![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
I have a component that will hold a Tree. In that tree are certain types of
Objects, called 'JReport' objects. Whenever a JReport Object is clicked, i want to notify a bunch of different components. Some of these have the same parent as the Tree, but most do not. What is the best way to design this? I want it to be as 'black-box' as possible, so no passing objects around if i can help it. Any suggestions? thanks! |
| Sponsored Links |
|
|||
|
Greg,
thanks for the response. i tried that google search, but only got back pages with C# stuff in them. Is there a specific class that sets this up, or is this strictly a design consideration? i assume the latter, but want to know if there's any hope for the former! thanks, peter |
|
|||
|
"peteandrus" <webforumsuser@macromedia.com> wrote in message news:ggfvkj$sje$1@forums.macromedia.com... >I have a component that will hold a Tree. In that tree are certain types of > Objects, called 'JReport' objects. Whenever a JReport Object is clicked, i > want > to notify a bunch of different components. Some of these have the same > parent > as the Tree, but most do not. > > What is the best way to design this? I want it to be as 'black-box' as > possible, so no passing objects around if i can help it. Any suggestions? > thanks! The Observer pattern is a good one for this. Luckily, Flex's binding architecture already implements this pattern. Create a model object that you change a property of based on what object has been clicked, then bind all the views to that property. HTH; Amy |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise