When we want to use [Inspectable] ] When metadata tag, please help me?
Thank you,
Ravi
[Inspectable]
metadata tag
Defines an attribute exposed to component users in the attribute hints and Tag inspector of Flex Builder. Also limits allowable values of the property.
For example, mx.core.Container The verticalScrollPolicy attribute has the following [Inspectable] tags.
[Inspectable(category="General", enumeration="off,on,auto", defaultValue="auto")]< br />public function get verticalScrollPolicy():String
{
return _verticalScrollPolicy;
}
This tells Flex Builder that this property should appear in the Flex Builder property inspector In the “General” tab (“Common” in my FB) (open the mxml file, go to the Windows menu and select “Flex Properties” to open the property inspector-above the inspector tab, near its title , You will find buttons to switch to standard view, category view and letter view. This attribute can take one of three values off, on, auto, if not specified, auto will be used as its default value.
< p>I have never used this tag, I believe you will not use it, unless you are writing a Flex The API is for more audiences than your colleagues (or if you are a perfectionist).
Anyone can briefly explain the [Inspectable] metadata tag . I read it in the real-time document and can’t understand it.
When we want to use the [Inspectable] metadata tag, please help me?
Thank you,
Ravi
The tag is used with the attribute to provide code hints for the attribute, and specify the attribute in A possible list of values that can be used when used in mxml. Unlike [Bindable] metadata, this tag does not have much impact on the work of the code (except for specifying default values)-this is mainly used to provide Flex Builder with information on how to handle specific properties
[Inspectable]
metadata tag
Defines an attribute exposed to component users in the attribute hints and Tag inspector of Flex Builder. Also limits allowable values of the property.
For example, the verticalScrollPolicy property of the mx.core.Container class has the following [Inspectable] tag.
>
[Inspectable(category="General", enumeration="off,on,auto", defaultValue="auto")]
public function get verticalScrollPolicy():String< br />{
return _verticalScrollPolicy;
}
This tells Flex Builder that this property should appear in the “General” tab of the Flex Builder property inspector (in my FB “Common”) (open the mxml file, go to the Windows menu and select “Flex Properties” to open the property inspector-above the inspector tab, near its title, you will find the switch to standard view, category view and The button of the letter view. This attribute can take one of the three values off, on, auto, if not specified, auto will be used as its default value.
I have never used this tag, I believe You also won’t use it unless you are writing a Flex API for use by a wider audience than your colleagues (or if you are a perfectionist).