日志 7.20,2008

Today, I saw a colleague studying a section of codes of a control of flex, I feel strange. Frankly speaking , I have used lots of the open codes of flex controls written by others, but I hava never studied them, I read them to know how to use them, not to know how they implement them. I think it's not a good thing. So I let him pass the code to me, and I study it carefully.

这是一个输入的控件代码,它的特点是控件的最左端是一个图片,当没有输入时,控件显示一个默认的string,一旦有了输入后,就跟正常的输入控件一样。

override public function initialize():这个函数是在控件初始化时被调用的代码,它调用的时间是在initialize事件之前,过程是这样的:当控件第一次被加入到父组件中时,会调用这个方法,这个方法首先会dispatch preinitialize事件,然后调用createChildren方法,最后dispatch initialize事件。

你可能感兴趣的:(Flex)