Is your property a skin part?
If so you only need to push the value into skin when this changes.
so if your textArea si a skin part you could have a property like areaText:String;
public var textArea:TextArea;
private var _textAreaString:String;
public function set textAreaString(value:String):void
if (_textAreaString != value)
_textAreaString != value;
textArea.text = _textAreaString;
This is straight forward, you can wait untuil commitProperties with a dirtyFlag.
Make sure you push this textArea.text = _textAreaString; on partAdded also.
Not sure if this was your use case but it offers you an example ...
The skin class(say MySkin) of TextArea(say myTA) has an image component added from my end. I need to access that image component in the skin(mySkin) from the MXML file where I have used the TextArea(myTA)
The HostComponent has a skin property but is typed as UIComponent (declared in skinable). You'd have to perform a casting on "skin" property which tights your comp to its skin.
Still you can have your image as a skin part and perform stuff on load or whatever.
1 person found this helpful
Make your image component in your myTA class a skin part.
public var myImage:Image;
Then in your skin class, give your Image an id of "myImage". The myImage property in your myTA will now point to your Image in your skin.
Override the partAdded and partRemoved functions in myTA to modify properties of your Image.