Check Chapter 6 (Messaging) of the Parsley documentation:
With this architectural framework, you will be able to dispatch a message (aka notification, aka event) from anywhere to anywhere in a fully decoupled way, which will solve a lot of your problems, especially when using a popup.
With regular Flex events, you have the following problems:
- If you dispatch a bubbling event, the target is the dispatching component and the component that is interested in the event needs to be in the display list and upper in the hierarchy. If it's a sibbling - at the same tree level in the hierarchy of the display list - or an object that is not in the display list - e.g because it's not currently added or non-visual - it won't get the event.
- If you dispatch a non-bubbling event, you dispatch it directly on the interested component. It becomes the target. The problem here is coupling. One class has to know about another.
Thanks for the reply karl
I checked it out and it looks good. Is there any way i can use the messaging API without working with MVC framework directly? I dont want to rewrite my application because i have come along way and i dont have much time! I just wished i started it out with this framework! It looks good.
I guess i'm still stuck!
No, you're not stuck.
The good thing about Parsley is that you can take just the bits you need. It is not a MVC framework. It does not enforce MVC like some other frameworks though you can create a MVC type application with it.
So, if you just want to use its Messaging features, you can.