Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated states to be compatible with 4.5.1

  • Loading branch information...
commit 129b0d1b3b297a31cca2640e15624ae69436d233 1 parent df40b1b
@benstucki benstucki authored
View
11 src/mx/mxml/FlexReferences.as
@@ -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;
}
}
View
6 src/mx/states/AddItems.as
@@ -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);
View
12 src/mx/states/OverrideBase.as
@@ -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.
View
6 src/mx/states/SetProperty.as
@@ -11,11 +11,11 @@ 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; }
@@ -23,7 +23,7 @@ package mx.states
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; }
View
6 src/mx/states/SetStyle.as
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.