Reputation: 1979
If I need to call a specific function in the parent application from a child in a flex project, what's the best practice for this? Would it be to dispatch a custom event from the child and have a listener call that function? Or to directly call the function with FlexGlobals.topLevelApplication?
Upvotes: 0
Views: 574
Reputation:
OOP would say that Events are the way to go, since globals are anti-OOP and also since the event at least promotes some level of separation between the caller and the callee.
Upvotes: 4