开发者

Using events vs. directly calling parent application function from a child in Flex / Flash Builder

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.topLevelApplicatio开发者_如何学Gon?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜