Macromedia flex 2-migrating applications to flex 2 Manual De Usuario

Descargar
Página de 184
52
Flex Classes
Enumerated values are now constants
In many cases, properties that took a predefined list of values (such as the Button control’s 
labelPlacement
 property taking 
right
left
bottom
, and 
top
) now take class constants as 
well. For example, the 
labelPlacement
 property can now take one of the following 
constants:
ButtonLabelPlacement.RIGHT
ButtonLabelPlacement.LEFT
ButtonLabelPlacement.BOTTOM
ButtonLabelPlacement.TOP
Other properties that now use constants include the Box control’s 
direction
 property; the 
Container control’s 
creationPolicy
hScrollPolicy
, and 
vScrollPolicy
 properties, and 
the ProgressBar control’s 
direction
labelPlacement
, and 
mode
 properties.
This change applies to ActionScript code. In general, the MXML usage has not changed.
life-cycle methods
The 
createChildren()
childrenCreated()
commitProperties()
measure()
, and 
updateDisplayList()
 methods of UIComponent are now protected rather than public. 
These are component life-cycle methods that the framework calls, and which component 
developers must override, but they should not be called directly.
Flex 1.x:
override public function measure():void {
...
}
Flex 2:
override protected function measure():void {
...
}
mx.core.UIObject
The UIObject base class has been merged with the UIComponent class. UIComponent is 
now the lowest-level base class for nonskins. For information about changes to the combined 
object, see