views:

256

answers:

2

Are there any way to declare a child component in mxml which is private/protected or even static?

Sure we can do this inside a script tag, but are there any other way?

+1  A: 

Ashier suggests using the "Exclude" metadata tag, but Maskit offers its limitations and suggests alternative solutions:

http://blog.ashier.com/2008/03/25/hiding-properties-in-flex-components/
http://smaskit.blogspot.com/2008/07/making-mxml-subcomponent-private.html

Luis B
The workaround suggested in the 2nd link is quite good (+1 for that). But still none of those do static child component :(
Andy Li
Accepted this answer since it is the only thing can be done so far. Hope Flex 5 will support mxml static/private :(
Andy Li
A: 

In the strict meaning of these terms, no you can't do that using mxml. The second link posted by Luis contains some workarounds for private/protected behavior.

Amarghosh