Permalink
Browse files

updated states to be compatible with 4.5.1

  • Loading branch information...
1 parent df40b1b commit 129b0d1b3b297a31cca2640e15624ae69436d233 @benstucki committed Aug 8, 2011
@@ -13,9 +13,12 @@ package mx.mxml
import mx.core.DeferredInstanceFromClass;
import mx.core.FontAsset;
import mx.core.IStateClient2;
- import mx.core.Repeater;
import mx.filters.IBitmapFilter;
import mx.states.AddItems;
+ import mx.states.IOverride;
+ import mx.states.SetProperty;
+ import mx.states.SetStyle;
+ import mx.states.State;
import mx.styles.CSSStyleDeclaration;
/**
@@ -49,7 +52,11 @@ package mx.mxml
static private var bf:IBitmapFilter;
static private var difc:DeferredInstanceFromClass;
- //static private var ai:AddItems;
+ static private var ai:AddItems;
+ static private var io:IOverride;
+ static private var sp:SetProperty;
+ static private var ss:SetStyle;
+ static private var st:State;
}
}
@@ -23,11 +23,11 @@ package mx.states
private var item:*; // garbage collection?
- public function initialize():void {
+ override public function initialize():void {
//trace("init");
}
- public function apply(parent:Object):void {
+ override public function apply(parent:Object):void {
var object:* = getOverrideContext(destination, parent);
item = (itemsFactory as DeferredInstanceFromFunction).getInstance();
if(propertyName == null || propertyName == "mxmlContent") {
@@ -39,7 +39,7 @@ package mx.states
}*/
}
- public function remove(parent:Object):void {
+ override public function remove(parent:Object):void {
var object:* = getOverrideContext(destination, parent);
if(propertyName == null || propertyName == "mxmlContent") {
parent.removeElement(item);
@@ -6,6 +6,18 @@ package mx.states
public class OverrideBase extends EventDispatcher //implements IOverride
{
+ public function initialize():void {
+
+ }
+
+ public function apply(parent:Object):void {
+
+ }
+
+ public function remove(parent:Object):void {
+
+ }
+
/**
* @private
* @param parent The document level context for this override.
@@ -11,19 +11,19 @@ package mx.states
private var oldValue:*;
- public function initialize():void {
+ override public function initialize():void {
//trace("init");
}
- public function apply(parent:Object):void {
+ override public function apply(parent:Object):void {
if(parent == null || target == null) { return; }
var item:Object = parent[target];
if(item == null) { return; }
oldValue = item[name];
item[name] = value;
}
- public function remove(parent:Object):void {
+ override public function remove(parent:Object):void {
if(parent == null || target == null) { return; }
var item:Object = parent[target];
if(item == null) { return; }
@@ -11,16 +11,16 @@ package mx.states
private var oldValue:*;
- public function initialize():void {
+ override public function initialize():void {
//trace("init");
}
- public function apply(parent:Object):void {
+ override public function apply(parent:Object):void {
oldValue = parent[target].getStyle(name);
parent[target].setStyle(name, value);
}
- public function remove(parent:Object):void {
+ override public function remove(parent:Object):void {
parent[target].setStyle(name, oldValue);
oldValue = null;
}

0 comments on commit 129b0d1

Please sign in to comment.