开发者

FLEX: question about MXML syntax

开发者 https://www.devze.com 2022-12-30 10:54 出处:网络
I would like to know if it is the same to assign properties to my custom component in its own class, or from the parent document. Please see snippet below:

I would like to know if it is the same to assign properties to my custom component in its own class, or from the parent document. Please see snippet below:

Here I assign the property bottom in my custom component class:

<?xml version="1.0"?>
<mx:LinkButton bottom="20" >        

    <mx:Script>
...

Here I assign the property bottom when I use the component in my main MX开发者_开发问答ML file

<myComp:Brick bottom="10"/>

Am I overriding the original one ?

Thanks


Yes. The one which you gave in the main MXML will get applied.


You don't override in the sense of oop, but you reassign the value of the property to a new value, yes.

0

精彩评论

暂无评论...
验证码 换一张
取 消