Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Duplicate
-
Adobe Flex SDK Previous
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows XP
Language Found: English
Description
Description:
It would be useful to be able to specify access modifiers for objects that are defined by MXML tags, just as you can for AS3 class members. Currently all MXML tags with an id are public.
A suggested implementation would be to define a namespace for each modifier, and put the id in that namespace.
<mx:Canvas xmlns:mx="http://www.macromedia.com/2005/mxml"
xmlns:private="http://www.macromedia.com/2005/as3lang/private"
xmlns:public="http://www.macromedia.com/2005/as3lang/public"
xmlns:internal="http://www.macromedia.com/2005/as3lang/internal"
xmlns:protected="http://www.macromedia.com/2005/as3lang/protected">
<mx:Button private:id="myButton" />
</mx:Canvas>
Alternatively, a visibility attribute could be added, which has the advantage of allowing properties to be also declared as "static", but the above seems more flexible otherwise.