FLEX: How can I share components IDs through modules?
Are IDs attributes shared between different modules in Flex ?
i.e. I have a text area wi开发者_如何学编程th id="text1" in my menu.mxml file.
And I want to write on it from another module mainArea.mxml
The debug gives me error, so how can I share different components ?
thanks
I'd suggest you create a central model object that contains the text instead of trying to access elements by ID. If you access elements by ID -- and I'm not sure if this works cross-module -- you tightly couple your code as opposed to having a central model that takes care of that. Then the calling code does not need to know about the text area or label or whatever you happen to bind to it.
精彩评论