Introducing.. MultiLoader!
This was driven by API simplifcation, but it turns out to be a really cool class.
- Replaces some of the guts of DataPack.
- Replaces DataPackLoader.
- Replaces EmbeddedSwfLoader, although I'm not going to remove that just yet.
- Can be used to coordinate loading of multiple instances of just about anything.

More documentation coming soon.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4953 542714f4-19e9-0310-aa3c-eee0fc999fb1

error: pathspec 'src/as/com/threerings/util/MultiLoader.as' did not match any file(s) known to git

--- src/as/com/threerings/util/MultiLoader.as
+++ src/as/com/threerings/util/MultiLoader.as
@@ -0,0 +1,238 @@
+//
+// $Id$
+
+package com.threerings.util {
+
+import flash.display.Loader;
+import flash.display.LoaderInfo;
+
+import flash.events.AsyncErrorEvent;
+import flash.events.ErrorEvent;
+import flash.events.Event;
+import flash.events.IEventDispatcher;
+import flash.events.IOErrorEvent;
+import flash.events.SecurityErrorEvent;
+
+import flash.net.URLRequest;
+
+import flash.system.ApplicationDomain;
+import flash.system.LoaderContext;
+
+import flash.utils.ByteArray;
+import flash.utils.Dictionary;
+
+/**
+ * Easy loader for many things, including managing multiple downloads.
+ * More documentation coming.
+ */
+public class MultiLoader
+{
+    /**
+     * Super-convenient function! Load multiple sources and have the DisplayObjects returned.
+     *
+     * @example
+     * <listing version="3.0">
+     * MultiLoader.getContents(EMBED_CONSTANT, addChild);
+     * </listing>
+     *
+     * @example
+     * <listing version="3.0">
+     * MultiLoader.getContents([EMBED1, EMBED2, EMBED3], addChild, true);
+     * </listing>
+     *
+     * @example
+     * <listing version="3.0">
+     * function handleComplete (result :Object) :void {
+     *    // process a result here. Result may be a DisplayObject or an Error.
+     * };
+     *
+     * var obj :Object = {
+     *     key1: "http://somehost.com/someImage.gif",
+     *     key2: "http://somehost.com/someOtherImage.gif"
+     * };
+     *
+     * MultiLoader.getContents(obj, handleComplete, true);
+     * </listing>
+     *
+     * @example
+     * <listing version="3.0">
+     * function handleComplete (results :Array) :void {
+     *     // process results here
+     * };
+     *
+     * MultiLoader.getContents([EMBED1, EMBED2, EMBED3], handleComplete);
+     * </listing>
+     */
+    public static function getContents (
+        sources :Object, completeCallback :Function, forEach :Boolean = false,
+        appDom :ApplicationDomain = null) :void
+    {
+        var complete :Function = function (retval :Object) :void {
+            completeCallback(processProperty(retval, Loader, "content"));
+        };
+        getLoaders(sources, complete, forEach, appDom);
+    }
+
+    /**
+     * Exactly like getContents() only it returns the Loader objects.
+     * @see getContents()
+     */
+    public static function getLoaders (
+        sources :Object, completeCallback :Function, forEach :Boolean = false,
+        appDom :ApplicationDomain = null) :void
+    {
+        var generator :Function = function (source :*) :Object {
+            // first transform common sources to their more useful nature
+            if (source is String) {
+                source = new URLRequest(String(source));
+            } else if (source is Class) {
+                // it's probably a ByteArray from an Embed, but don't cast it
+                source = new (source as Class)();
+            }
+            var l :Loader = new Loader();
+            var lc :LoaderContext = new LoaderContext(false, appDom);
+            // now we only need handle the two cases
+            if (source is URLRequest) {
+                l.load(URLRequest(source), lc);
+            } else if (source is ByteArray) {
+                l.loadBytes(ByteArray(source), lc);
+            } else {
+                return new Error("Unknown source: " + source);
+            }
+            return l.contentLoaderInfo;
+        };
+
+        var complete :Function = function (retval :Object) :void {
+            completeCallback(processProperty(retval, LoaderInfo, "loader"));
+        };
+
+        new MultiLoader(sources, generator, complete, forEach);
+    }
+
+    /**
+     * Coordinate loading some asynchronous objects.
+     *
+     * @param sources An Array, Dictionary, or Object of sources, or just a single source.
+     * @param generatorFunciton a function to call to generate the loaders
+     * @param completeCallack the function to call when complete
+     * @param forEach whether to call the completeCallback for each source, or all-at-once at
+     * the end. If forEach is used, keys will never be return
+     * @param errorTypes an Array of event types that will be dispatched on error
+     * @param completeType, the event complete type.
+     */
+    public function MultiLoader (
+        sources :Object, generatorFn :Function, completeCallback :Function,
+        forEach :Boolean = false, errorTypes :Array = null, completeType :String = null)
+    {
+        if (errorTypes == null) {
+            errorTypes = [ ErrorEvent.ERROR, AsyncErrorEvent.ASYNC_ERROR,
+                IOErrorEvent.IO_ERROR, SecurityErrorEvent.SECURITY_ERROR ];
+        }
+        if (completeType == null) {
+            completeType = Event.COMPLETE;
+        }
+
+        _complete = completeCallback;
+        _forEach = forEach;
+
+        if (sources is Array) {
+            _result = new Array();
+
+        } else if (sources is Dictionary) {
+            _result = new Dictionary();
+
+        } else {
+            _result = new Object();
+            if (!Util.isPlainObject(sources)) {
+                trace("Sources is not a plain object: " + sources);
+                // stash the singleton source
+                sources = { singleton_key: sources };
+            }
+        }
+
+        for (var key :* in sources) {
+            var sourceVal :Object = sources[key];
+            var val :Object;
+            try {
+                val = (sourceVal is Array) ? generatorFn.apply(null, sourceVal as Array)
+                                           : generatorFn(sourceVal);
+            } catch (err :Error) {
+                val = err;
+            }
+            _result[key] = val;
+            if (val is IEventDispatcher) {
+                var ed :IEventDispatcher = IEventDispatcher(val);
+                _remaining++;
+                _targetsToKeys[ed] = key;
+                ed.addEventListener(completeType, handleComplete);
+                for each (var type :String in errorTypes) {
+                    ed.addEventListener(type, handleError);
+                }
+            } else if (_forEach) {
+                checkReport(key);
+            }
+        }
+
+        if (!_forEach) {
+            checkReport(null);
+        }
+    }
+
+    protected function handleError (event :ErrorEvent) :void
+    {
+        _result[_targetsToKeys[event.target]] = new Error(event.text) // , event.errorID); ???
+        handleComplete(event); // the rest is the same as complete
+    }
+
+    protected function handleComplete (event :Event) :void
+    {
+        _remaining--;
+        checkReport(_targetsToKeys[event.target]);
+    }
+
+    protected function checkReport (key :*) :void
+    {
+        if (!_forEach && _remaining > 0) {
+            return;
+        }
+
+        var thisResult :Object = (_forEach || (key === "singleton_key")) ? _result[key] : _result;
+        try {
+            _complete(thisResult);
+        } catch (err :Error) {
+            trace("MultiLoader: Could not call completeCallback: " + err);
+        }
+    }
+
+    /**
+     * Utility method used in this class.
+     *
+     */
+    protected static function processProperty (
+        retval :Object, testClass :Class, prop :String) :Object
+    {
+        if (retval is testClass) {
+            retval = retval[prop];
+        } else {
+            for (var key :* in retval) {
+                var o :Object = retval[key];
+                if (o is testClass) {
+                    retval[key] = o[prop];
+                } // else keep it the same
+            }
+        }
+        return retval;
+    }
+
+    protected var _complete :Function;
+
+    protected var _result :Object;
+
+    protected var _targetsToKeys :Dictionary = new Dictionary(true);
+
+    protected var _forEach :Boolean;
+
+    protected var _remaining :int = 0;
+
+}
+}


61 shapes/OvalShape.as

61 shapes/OvalShape.as

error: pathspec 'raw/src/org/yellcorp/display/shapes/OvalShape.as' did not match any file(s) known to git

--- raw/src/org/yellcorp/display/shapes/OvalShape.as
+++ raw/src/org/yellcorp/display/shapes/OvalShape.as
@@ -0,0 +1,15 @@
+package org.yellcorp.display.shapes
+{
+public class OvalShape extends BaseFilledOutlinedShape
+{
+    public function OvalShape(startWidth:Number, startHeight:Number)
+    {
+        super(startWidth, startHeight);
+    }
+
+    protected override function draw(w:Number, h:Number):void
+    {
+        graphics.drawEllipse(0, 0, w, h);
+    }
+}
+}


AmbidextrousList, can have its scrollbar on the left or right side.
In fact, it can be swapped while the user is dragging it...

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@463 ed5b42cb-e716-0410-a449-f6a68f950b19

error: pathspec 'src/as/com/threerings/flex/AmbidextrousList.as' did not match any file(s) known to git

--- src/as/com/threerings/flex/AmbidextrousList.as
+++ src/as/com/threerings/flex/AmbidextrousList.as
@@ -0,0 +1,58 @@
+package com.threerings.flex {
+
+import mx.controls.List;
+
+import mx.core.EdgeMetrics;
+
+/**
+ * A list that can be configured with the vertical scrollbar on the left or right side.
+ */
+public class AmbidextrousList extends List
+{
+    /**
+     * Get whether the scrollbar is on the left side.
+     */
+    public function get scrollBarOnLeft () :Boolean
+    {
+        return _scrollLeft;
+    }
+
+    /**
+     * Sets whether to place the scrollbar on the left or right side.
+     */
+    public function set scrollBarOnLeft (scrollLeft :Boolean) :void
+    {
+        _scrollLeft = scrollLeft;
+
+        scrollAreaChanged = true;
+        invalidateDisplayList();
+    }
+
+    /** @inheritDoc */
+    override public function get viewMetrics () :EdgeMetrics
+    {
+        var em :EdgeMetrics = super.viewMetrics;
+
+        if (_scrollLeft && verticalScrollBar && verticalScrollBar.visible) {
+            em.right -= verticalScrollBar.minWidth;
+            em.left += verticalScrollBar.minWidth;
+        }
+
+        return em;
+    }
+
+    /** @inheritDoc */
+    override protected function updateDisplayList (uw :Number, uh :Number) :void
+    {
+        super.updateDisplayList(uw, uh);
+
+        if (_scrollLeft) {
+            var vm :EdgeMetrics = viewMetrics;
+            verticalScrollBar.move(vm.left - verticalScrollBar.minWidth, vm.top);
+        }
+    }
+
+    /** Do we want to have the scrollbar on the left? */
+    protected var _scrollLeft :Boolean;
+}
+}


添加全局方法操作面板对象

添加全局方法操作面板对象

在PanelUtil类中添加getPanelByID静态方法......

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/SuperMap/Flash-Bev.git/'


[feat] refactor replacetokens to PLF

[feat] refactor replacetokens to PLF

- so other classes can use it

error: pathspec 'src/main/actionscript/com/dotfold/dotvimstat/tokenreplacement/replacetokens.as' did not match any file(s) known to git

--- src/main/actionscript/com/dotfold/dotvimstat/tokenreplacement/replacetokens.as
+++ src/main/actionscript/com/dotfold/dotvimstat/tokenreplacement/replacetokens.as
@@ -0,0 +1,29 @@
+package com.dotfold.dotvimstat.tokenreplacement
+{
+	/**
+	 * Package level function - replace tokens utility.
+	 *
+	 * Finds named tokens in the template String, with the format:
+	 * {name} and replaces them with values found in the supplied Object.
+	 *
+	 * @author jamesmcnamee
+	 *
+	 */
+	public function replacetokens(template:String, data:Object):String
+	{
+		var pattern:RegExp = new RegExp('{([^}]+)}', 'gi');
+
+		return template.replace(pattern, function(...rest):String { //match:String, $1:Object):String {
+
+			var match:String = rest[0] as String;
+			var token:String = rest[1] as String;
+
+			// find the token vlaue in the object
+			if (data && data.hasOwnProperty(token)) {
+				return data[token];
+			}
+			// could not replace token, return token as is
+			return match;
+		});
+	}
+}


ViewInjectionProcessor should cache views weakly

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/eric-stanley/robotlegs-framework.git/'


First commit: binder for keyboard/gamepad input

error: pathspec 'com/zehfernando/input/UniversalBinder.as' did not match any file(s) known to git

--- com/zehfernando/input/UniversalBinder.as
+++ com/zehfernando/input/UniversalBinder.as
@@ -0,0 +1,266 @@
+package com.zehfernando.input {
+	import com.zehfernando.signals.SimpleSignal;
+	import com.zehfernando.utils.console.log;
+
+	import flash.display.Stage;
+	import flash.events.Event;
+	import flash.events.GameInputEvent;
+	import flash.events.KeyboardEvent;
+	import flash.ui.GameInput;
+	import flash.ui.GameInputControl;
+	import flash.ui.GameInputDevice;
+	/**
+	 * @author zeh fernando
+	 */
+	public class UniversalBinder {
+
+		// Provides universal input control, especially for game and keyboard
+
+		// A proxy class: http://pastebin.com/BQQGH34H
+
+		// Properties
+		private var _isStarted:Boolean;
+
+		// Instances
+		private var bindings:Vector.<Binding>;						// Actual bindings
+		private var commandsActivations:Object;						// How many activations each command has (key string with value uint)
+
+		private var _onCommandPressed:SimpleSignal;
+		private var _onCommandFired:SimpleSignal;
+		private var _onCommandReleased:SimpleSignal;
+
+		private var stage:Stage;
+		private var gameInput:GameInput;
+
+		// ================================================================================================================
+		// CONSTRUCTOR ----------------------------------------------------------------------------------------------------
+
+		public function UniversalBinder(__stage:Stage) {
+			stage = __stage;
+			gameInput = new GameInput();
+			bindings = new Vector.<Binding>();
+			commandsActivations = {};
+
+			_onCommandPressed = new SimpleSignal();
+			_onCommandFired = new SimpleSignal();
+			_onCommandReleased = new SimpleSignal();
+		}
+
+
+		// ================================================================================================================
+		// INTERNAL INTERFACE ---------------------------------------------------------------------------------------------
+
+		private function filterKeys(__keyCode:uint, __keyLocation:uint):Vector.<Binding> {
+			// Returns a list of all key bindings that fit a filter
+
+			var filteredKeys:Vector.<Binding> = new Vector.<Binding>();
+
+			for (var i:int = 0; i < bindings.length; i++) {
+				if (bindings[i].keyCode == __keyCode && bindings[i].keyLocation == __keyLocation) {
+					filteredKeys.push(bindings[i]);
+				}
+			}
+
+			return filteredKeys;
+		}
+
+		private function addGameInputDeviceEvents():void {
+			// Add events to all devices currently attached
+			// http://www.adobe.com/devnet/air/articles/game-controllers-on-air.html
+
+			var device:GameInputDevice;
+			var i:int, j:int;
+
+			for (i = 0; i < GameInput.numDevices; i++) {
+                device = GameInput.getDeviceAt(i);
+				device.enabled = true;
+				for (j = 0; j < device.numControls; j++) {
+					device.getControlAt(i).addEventListener(Event.CHANGE, onGameInputDeviceChanged, false, 0, true);
+				}
+			}
+		}
+
+		private function removeGameInputDeviceEvents():void {
+			// Remove events from all devices currently attached
+
+			var device:GameInputDevice;
+			var i:int, j:int;
+
+			for (i = 0; i < GameInput.numDevices; i++) {
+                device = GameInput.getDeviceAt(i);
+				for (j = 0; j < device.numControls; j++) {
+					device.getControlAt(i).removeEventListener(Event.CHANGE, onGameInputDeviceChanged);
+				}
+			}
+		}
+
+
+		// ================================================================================================================
+		// EVENT INTERFACE ------------------------------------------------------------------------------------------------
+
+		private function onKeyDown(__e:KeyboardEvent):void {
+			//	log("key down: " + __e);
+			var filteredKeys:Vector.<Binding> = filterKeys(__e.keyCode, __e.keyLocation);
+			for (var i:int = 0; i < filteredKeys.length; i++) {
+				if (!filteredKeys[i].isPressed) {
+					// Marks as pressed
+					filteredKeys[i].isPressed = true;
+
+					// Counts as one press of that command, creating if needed
+					if (!commandsActivations.hasOwnProperty(filteredKeys[i].command)) commandsActivations[filteredKeys[i].command] = 0;
+					commandsActivations[filteredKeys[i].command]++;
+
+					// Dispatches signal
+					_onCommandPressed.dispatch(filteredKeys[i].command);
+				}
+
+				_onCommandFired.dispatch(filteredKeys[i].command);
+			}
+		}
+
+		private function onKeyUp(__e:KeyboardEvent):void {
+			var filteredKeys:Vector.<Binding> = filterKeys(__e.keyCode, __e.keyLocation);
+			for (var i:int = 0; i < filteredKeys.length; i++) {
+				// Marks as released
+				filteredKeys[i].isPressed = false;
+
+				// Removes the press count
+				commandsActivations[filteredKeys[i].command]--;
+
+				// Dispatches signal
+				_onCommandReleased.dispatch(filteredKeys[i].command);
+			}
+		}
+
+		private function onGameInputDeviceAdded(__e:GameInputEvent):void {
+			removeGameInputDeviceEvents();
+			addGameInputDeviceEvents();
+		}
+
+		private function onGameInputDeviceRemoved(__e:GameInputEvent):void {
+			removeGameInputDeviceEvents();
+		}
+
+		private function onGameInputDeviceChanged(__e:Event):void {
+			var control:GameInputControl = __e.target as GameInputControl;
+
+			if (control.value > control.minValue + (control.maxValue - control.minValue) / 2) {
+				// It is activated
+				log("control activated => " + control);
+				// TODO:
+				// * register command as activated
+				// * register command value
+			} else {
+				log("control deactivated => " + control);
+			}
+		}
+
+
+		// ================================================================================================================
+		// PUBLIC INTERFACE -----------------------------------------------------------------------------------------------
+
+		public function start():void {
+			if (!_isStarted) {
+				// Starts listening to keyboard events
+				stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
+				stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
+
+				// Starts listening to device addition events
+				gameInput.addEventListener(GameInputEvent.DEVICE_ADDED, onGameInputDeviceAdded);
+                gameInput.addEventListener(GameInputEvent.DEVICE_REMOVED, onGameInputDeviceRemoved);
+
+
+				_isStarted = true;
+			}
+		}
+
+		public function stop():void {
+			if (_isStarted) {
+				// Stops listening to keyboard events
+				stage.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyDown, false);
+				stage.removeEventListener(KeyboardEvent.KEY_UP, onKeyUp, false);
+
+				// Stops listening to device addition events
+				gameInput.removeEventListener(GameInputEvent.DEVICE_ADDED, onGameInputDeviceAdded);
+                gameInput.removeEventListener(GameInputEvent.DEVICE_REMOVED, onGameInputDeviceRemoved);
+
+				_isStarted = false;
+			}
+		}
+
+		public function addCommandBinding(__keyCode:int, __keyLocation:int):void {
+			var binding:Binding = new Binding();
+			binding.keyCode = __keyCode;
+			binding.keyLocation = __keyLocation;
+			bindings.push(binding);
+		}
+
+		public function isCommandPressed(__command:String):Boolean {
+			return commandsActivations.hasOwnProperty(__command) && commandsActivations[__command] > 0;
+		}
+
+//		public function setFromXML(__xmlData:XML):void {
+//			// Set items from a list of <key> nodes
+//
+//			var keyDatas:XMLList = __xmlData.child("key");
+//
+//			for (var i:int = 0; i < keyDatas.length(); i++) {
+//				keys.push(Binding.fromXML(keyDatas[i]));
+//			}
+//		}
+
+
+		// ================================================================================================================
+		// ACCESSOR INTERFACE ---------------------------------------------------------------------------------------------
+
+		public function get onCommandPressed():SimpleSignal {
+			return _onCommandPressed;
+		}
+
+		public function get onCommandFired():SimpleSignal {
+			return _onCommandFired;
+		}
+
+		public function get onCommandReleased():SimpleSignal {
+			return _onCommandReleased;
+		}
+
+	}
+}
+
+class Binding {
+
+	// Properties
+	public var keyCode:uint;
+	public var keyLocation:uint;
+	public var command:String;
+	public var isPressed:Boolean;
+
+	// ================================================================================================================
+	// CONSTRUCTOR ----------------------------------------------------------------------------------------------------
+
+	public function Binding() {
+		keyCode = 0;
+		keyLocation = 0;
+		command = "";
+		isPressed = false;
+	}
+
+	// TODO: add modifiers
+
+	// ================================================================================================================
+	// PUBLIC INTERFACE -----------------------------------------------------------------------------------------------
+
+//	public static function fromXML(__keyData:XML):Binding {
+//		// Based on a <key> node, returns a key binding instance
+//		// E.g.: <key code="8" shift="true">focus_prev</key>
+//
+//		var binding:Binding = new Binding();
+//
+//		binding.keyCode			= XMLUtils.getAttributeAsInt(__keyData, "code");
+//		binding.modifierShift	= XMLUtils.getAttributeAsBoolean(__keyData, "shift");
+//		binding.command			= __keyData.toString();
+//
+//		return binding;
+//	}
+}


Refactored Data to include DataList helper class
Updated tests, demos, and operators to new Data syntax
Created new Sort object instances to encapsulate sort criteria

git-svn-id: 6aa7ccb0a2048310a30f08a72aaff4ca39d980ed@55 91848ab2-c4ae-4e4f-8e6a-6a52ea0dccc3

error: pathspec 'flare.vis/flare/vis/data/DataList.as' did not match any file(s) known to git

--- flare.vis/flare/vis/data/DataList.as
+++ flare.vis/flare/vis/data/DataList.as
@@ -0,0 +1,310 @@
+package flare.vis.data
+{
+	import flash.utils.Proxy;
+	import flash.utils.flash_proxy;
+	import flash.utils.Dictionary;
+	import flare.util.Arrays;
+	import flare.animate.Transitioner;
+	import flare.vis.scale.Scales;
+	import flare.util.Stats;
+	import flare.vis.scale.Scale;
+	import flare.util.Property;
+	import flare.util.Sort;
+	import flare.util.Sort;
+	import flare.util.Sort;
+	import flare.util.Sort;
+
+	public class DataList extends Proxy
+	{
+		/** Hashed set of items in the data list. */
+		protected var _map:Dictionary = new Dictionary();
+		/** Array of items in the data set. */
+		protected var _list:Array = [];
+		/** Default property values to be applied to new items. */
+		protected var _defs:Object = null;
+		/** Cache of Stats objects for item properties. */
+		protected var _stats:Object = {};
+		/** The underlying array storing the list. */
+		internal function get list():Array { return _list; }
+
+		/** Internal count of visitors traversing the current list.*/
+		private var _visiting:int = 0;
+		private var _sort:Sort;
+
+		/** The number of items contained in this list. */
+		public function get size():int { return _list.length; }
+
+		/** A standing sort criteria for items in the list. */
+		public function get sort():Sort { return _sort; }
+		public function set sort(s:*):void {
+			_sort = s==null ? s : (s is Sort ? Sort(s) : new Sort(s));
+			if (_sort != null) _sort.sort(_list);
+		}
+
+
+		// -- Basic Operations: Contains, Add, Remove, Clear ------------------
+
+		public function contains(o:Object):Boolean
+		{
+			return (_map[o] != undefined);
+		}
+
+		internal function add(o:Object):Object
+		{
+			_map[o] = _list.length;
+			_stats = {};
+			if (_sort != null) {
+				var idx:int = Arrays.binarySearch(_list, o, _sort.comparator);
+				_list.splice(-(idx+1), 0, o);
+			} else {
+				_list.push(o);
+			}
+			return o;
+		}
+
+		internal function remove(o:Object):Boolean
+		{
+			if (_map[o] == undefined) return false;
+			if (_visiting > 0) {
+				// if called from a visitor, use a copy-on-write strategy
+				_list = Arrays.copy(_list);
+				_visiting = 0; // reset the visitor count
+			}
+			Arrays.remove(_list, o);
+			delete _map[o];
+			_stats = {};
+			return true;
+		}
+
+		internal function removeAt(idx:int):Object
+		{
+			var o:Object = Arrays.removeAt(_list, idx);
+			if (o != null) {
+				delete _map[o];
+				_stats = {};
+			}
+			return o;
+		}
+
+		internal function clear():void
+		{
+			_map = new Dictionary();
+			_list = [];
+			_stats = {};
+		}
+
+		// -- Sort ------------------------------------------------------------
+
+		/**
+		 * Sort DataSprites according to their properties. This method performs
+		 * a one-time sorting. To establish a consistent sort order robust over
+		 * the addition of new items, use the sort property.
+		 * @param a the sort arguments.
+		 * 	If a String is provided, the data will be sorted in ascending order
+		 *   according to the data field named by the string.
+		 *  If an Array is provided, the data will be sorted according to the
+		 *   fields in the array. In addition, field names can optionally
+		 *   be followed by a boolean value. If true, the data is sorted in
+		 *   ascending order (the default). If false, the data is sorted in
+		 *   descending order.
+		 */
+		public function sortBy(a:*):void
+		{
+			var args:Array;
+			if (a is String) args = [a];
+			else if (a is Array)  args = a;
+			else throw new ArgumentError("Illegal input: "+a);
+
+			var f:Function = Sort.sorter(args);
+			_list.sort(f);
+		}
+
+		// -- Visitation ------------------------------------------------------
+
+		public function visit(visitor:Function, reverse:Boolean=false,
+			filter:Function=null):Boolean
+		{
+			_visiting++; // mark a visit in process
+			var a:Array = _list; // use our own reference to the list
+			var i:uint, b:Boolean = true;
+
+			if (reverse && filter==null) {
+				for (i=a.length; --i>=0;)
+					if (!visitor(a[i])) {
+						b = false; break;
+					}
+			}
+			else if (reverse) {
+				for (i=a.length; --i>=0;)
+					if (filter(a[i]) && !visitor(a[i])) {
+						b = false; break;
+					}
+			}
+			else if (filter==null) {
+				for (i=0; i<a.length; ++i)
+					if (!visitor(a[i])) {
+						b = false; break;
+					}
+			}
+			else {
+				for (i=0; i<a.length; ++i)
+					if (filter(a[i]) && !visitor(a[i])) {
+						b = false; break;
+					}
+			}
+			_visiting = Math.max(0, --_visiting); // unmark a visit in process
+			return b;
+		}
+
+		// -- Default Values --------------------------------------------------
+
+		/**
+		 * Sets a default property value for newly created items.
+		 * @param name the name of the property
+		 * @param value the value of the property
+		 */
+		public function setDefault(name:String, value:*):void
+		{
+			if (_defs == null) _defs = {};
+			_defs[name] = value;
+		}
+
+		/**
+		 * Removes a default value for newly created items.
+		 * @param name the name of the property
+		 */
+		public function removeDefault(name:String):void
+		{
+			if (_defs != null) delete _defs[name];
+		}
+
+		/**
+		 * Sets default values for newly created items.
+		 * @param values the default properties to set
+		 */
+		public function setDefaults(values:Object):void
+		{
+			if (_defs == null) _defs = {};
+			for (var name:String in values)
+				_defs[name] = values[name];
+		}
+
+		/**
+		 * Clears all default value settings for this list.
+		 */
+		public function clearDefaults():void
+		{
+			_defs = null;
+		}
+
+		/**
+		 * Applies the default values to an object.
+		 * @param o the object on which to set the default values
+		 * @param vals the set of default property values
+		 */
+		public function applyDefaults(o:Object):void
+		{
+			if (_defs == null) return;
+			for (var name:String in _defs) {
+				Property.$(name).setValue(o, _defs[name]);
+			}
+		}
+
+		// -- Set Values ------------------------------------------------------
+
+		/**
+		 * Sets a property value on all items in the list.
+		 * @param name the name of the property
+		 * @param value the value of the property
+		 * @param trans an optional Transitioner for collecting value updates
+		 * @return the input transitioner
+		 */
+		public function setProperty(name:String, value:*,
+			trans:Transitioner=null):Transitioner
+		{
+			var t:Transitioner = (trans==null ? Transitioner.DEFAULT : trans);
+			for (var i:uint=0; i<_list.length; ++i)
+				t.setValue(_list[i], name, value);
+			return trans;
+		}
+
+		/**
+		 * Sets property values on all sprites in a given group.
+		 * @param vals an object containing the properties and values to set.
+		 * @param trans an optional Transitioner for collecting value updates
+		 * @return the input transitioner
+		 */
+		public function setProperties(vals:Object, trans:Transitioner=null)
+			: Transitioner
+		{
+			var t:Transitioner = (trans==null ? Transitioner.DEFAULT : trans);
+			for (var name:String in vals) {
+				for (var i:uint=0; i<_list.length; ++i)
+					t.setValue(_list[i], name, vals[name]);
+			}
+			return trans;
+		}
+
+		// -- Statistics ------------------------------------------------------
+
+		/**
+		 * Computes and caches statistics for a data field. The resulting
+		 * Stats object is cached, so that later access does not
+		 * require any re-calculation. The cache of statistics objects may be
+		 * cleared, however, if changes to the data set are made.
+		 * @param field the property name
+		 * @return a Stats object with the computed statistics
+		 */
+		public function stats(field:String):Stats
+		{
+			// TODO: allow custom comparators?
+
+			// check cache for stats
+			if (_stats[field] != undefined) {
+				return _stats[field] as Stats;
+			} else {
+				return _stats[field] = new Stats(_list, field);
+			}
+		}
+
+		// -- Scales ----------------------------------------------------------
+
+		/**
+		 * Create a new Scale instance for the given data field.
+		 * @param field the data property name to compute the scale for
+		 * @param which the data group (either NODES or EDGES) in which to look
+		 * @param scaleType the type of scale instance to generate
+		 * @return a Scale instance for the given data field
+		 * @see flare.vis.scale.Scales
+		 */
+		public function scale(field:String, scaleType:int=1, ...rest):Scale
+		{
+			var scale:Scale = Scales.scale(stats(field), scaleType);
+			// TODO: lookup formatting info (?)
+			return scale;
+		}
+
+		// -- Proxy Methods ---------------------------------------------------
+
+		flash_proxy override function getProperty(name:*):*
+		{
+        	return _list[name];
+    	}
+
+		flash_proxy override function nextNameIndex(idx:int):int
+		{
+			return (idx < _list.length ? idx + 1 : 0);
+		}
+
+		flash_proxy override function nextName(idx:int):String
+		{
+			return String(idx-1);
+		}
+
+		flash_proxy override function nextValue(idx:int):*
+		{
+			return _list[idx-1];
+		}
+
+	} // end of class DataList
+}


adding factoring functionality for DataSources

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


renaming method

renaming method


A simple Flash assert class. Where's a preprocessor when you need one...

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4876 542714f4-19e9-0310-aa3c-eee0fc999fb1

error: pathspec 'src/as/com/threerings/util/Assert.as' did not match any file(s) known to git

--- src/as/com/threerings/util/Assert.as
+++ src/as/com/threerings/util/Assert.as
@@ -0,0 +1,89 @@
+//
+// $Id$
+//
+// Narya library - tools for developing networked games
+// Copyright (C) 2002-2007 Three Rings Design, Inc., All Rights Reserved
+// http://www.threerings.net/code/narya/
+//
+// This library is free software; you can redistribute it and/or modify it
+// under the terms of the GNU Lesser General Public License as published
+// by the Free Software Foundation; either version 2.1 of the License, or
+// (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+package com.threerings.util {
+
+import flash.system.Capabilities;
+
+/**
+ * Simple implementation of assertion checks for debug environments.
+ * When running in a debug player, each function will test the assert expression,
+ * and if it fails, log an error message with a stack trace. When running in a
+ * release player, these functions do not run any tests, and exit immediately.
+ *
+ * Note: stack dumping is controlled via the Assert.dumpStack parameter.
+ *
+ * Usage example:
+ * <pre>
+ *   Assert.isNotNull(mystack.top());
+ *   Assert.isTrue(mystack.length == 1, "Unexpected number of items on stack!");
+ * </pre>
+ */
+public class Assert
+{
+    /** Controls whether stack dumps should be included in the error log (default value is true).*/
+    public static var dumpStack :Boolean = true;
+
+    /** Asserts that the value is equal to null. */
+    public static function isNull (value :*, message :String = null) :void
+    {
+        if (_debug && ! (value == null)) {
+            fail(message);
+        }
+    }
+
+    /** Asserts that the value is not equal to null. */
+    public static function isNotNull (value :*, message :String = null) :void
+    {
+        if (_debug && ! (value != null)) {
+            fail(message);
+        }
+    }
+
+    /** Asserts that the value is false. */
+    public static function isFalse (value :Boolean, message :String = null) :void
+    {
+        if (_debug && value) {
+            fail(message);
+        }
+    }
+
+    /** Asserts that the value is true. */
+    public static function isTrue (value :Boolean, message :String = null) :void
+    {
+        if (_debug && ! value) {
+            fail(message);
+        }
+    }
+
+    /** Displays an error message, with an optional stack trace. */
+    public static function fail (message :String) :void
+    {
+        _log.warning("Failure" + ((message != null) ? (": " + message) : ""));
+        if (dumpStack) {
+            _log.warning(new Error("dumpStack").getStackTrace());
+        }
+    }
+
+    protected static var _log :Log = Log.getLog(Assert);
+    protected static var _debug :Boolean = Capabilities.isDebugger;
+}
+}


Regression Testcase for Bug 535882 (r=dschaffe)

error: pathspec 'test/acceptance/regress/bug_535882.as' did not match any file(s) known to git

--- test/acceptance/regress/bug_535882.as
+++ test/acceptance/regress/bug_535882.as
@@ -0,0 +1,52 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine.].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Adobe AS3 Team
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+startTest();
+
+var myXML:XML = new XML('<Test><KeyFrame name="&kColor_TextEditTextFieldOutlineNormalEnd;" t="0.0" v="&kTextEditInnerShadow_DarkV;" /></Test>');
+var expected:String = '<Test><KeyFrame name="&kColor_TextEditTextFieldOutlineNormalEnd;" t="0.0" v="&kTextEditInnerShadow_DarkV;"/></Test>';
+
+
+var pp:Boolean = XML.prettyPrinting;
+
+XML.prettyPrinting = false;
+
+AddTestCase('Bug 535882 -  XMLParser incorrectly converts attribute values containing entities', expected, myXML.toXMLString());
+
+XML.prettyPrinting = pp;  // restore prettyPrinting setting
+
+test();


just some line breaks

just some line breaks


Converted HermiteFunc into a standard easing function. Untested.

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@542 ed5b42cb-e716-0410-a449-f6a68f950b19

error: pathspec 'src/as/com/threerings/flash/Easing.as' did not match any file(s) known to git

--- src/as/com/threerings/flash/Easing.as
+++ src/as/com/threerings/flash/Easing.as
@@ -0,0 +1,37 @@
+//
+// $Id$
+
+package com.threerings.flash {
+
+/**
+ * Some easing functions.
+ */
+public class Easing
+{
+    /**
+     * Interpolates cubically between two values, with beginning and end derivates set
+     * to zero. See http://en.wikipedia.org/wiki/Cubic_Hermite_spline for details.
+     */
+    public static function cubicHermiteSpline (
+        t :Number, b :Number, c :Number, d :Number, p_params :Object = null) :Number
+    {
+        // convert t to 0-1
+        t = (t / d);
+        if (t <= 0) {
+            return b;
+        }
+        const end :Number = b + c;
+        if (t >= 1) {
+            return end;
+        }
+        const startSlope :Number = (p_params == null) ? 0 : Number(p_params["startSlope"]);
+        const endSlope :Number = (p_params == null) ? 0 : Number(p_params["endSlope"]);
+        const tt :Number = t * t;
+        const ttt :Number = tt * t;
+        return b * (2*ttt - 3*tt + 1) +
+               startSlope * (ttt - 2*tt + t) +
+               end * (-2*ttt + 3*tt) +
+               endSlope * (ttt -tt);
+    }
+}
+}


added interface for eventdispatcher

added interface for eventdispatcher

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@538 bc4816be-ef27-423a-9c4d-fc420be121a2

error: pathspec 'src/reprise/events/IEventDispatcher.as' did not match any file(s) known to git

--- src/reprise/events/IEventDispatcher.as
+++ src/reprise/events/IEventDispatcher.as
@@ -0,0 +1,27 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Fork unstable media GmbH
+//  Copyright 2006-2008 Fork unstable media GmbH
+//  All Rights Reserved.
+//
+//  NOTICE: Fork unstable media permits you to use, modify, and distribute this
+//  file in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package reprise.events
+{
+
+	import flash.events.Event;
+
+	public interface IEventDispatcher
+	{
+		function addEventListener(type:String, listener:Function, useCapture:Boolean = false,
+			priority:int = 0, useWeakReference:Boolean = false):void;
+		function dispatchEvent(event:Event):Boolean;
+		function hasEventListener(type:String):Boolean;
+		function removeEventListener(type:String, listener:Function,
+			useCapture:Boolean = false):void;
+		function willTrigger(type:String):Boolean;
+	}
+}


Initial work on time module

Initial work on time module

error: pathspec 'modules/time.as' did not match any file(s) known to git

--- modules/time.as
+++ modules/time.as
@@ -0,0 +1,71 @@
+import "libc";
+
+// FIXME: Only works on macOS right now; arrow needs primitives for dealing with
+//        platform differences. Only works on SAFARI (macOS 10.12). Needs
+//        a whole lot of IFs.
+
+/// A Duration represents the elapsed time between two points
+/// as an int64 nanosecond count.
+type Duration = int64;
+
+implement Duration {
+  /// Returns the duration as a floating point number of seconds.
+  def Seconds(self): float64 {
+    let s = int64(self) / 1_000_000_000;
+    let ns = int64(self) % 1_000_000_000;
+
+    return float64(s) + float64(ns) * 1e-9;
+  }
+}
+
+/// A point in time.
+struct Time {
+  // Whole seconds (valid values are >= 0)
+  _sec: int64;
+
+  // Nanoseconds (valid values are [0, 999999999])
+  _nsec: int64;
+}
+
+implement Time {
+  /// Returns the duration between two points in time.
+  def Sub(self, u: Time): Duration {
+    let d: int64 = 0;
+    d += (self._sec - u._sec) * 1_000_000_000;
+    d += self._nsec - u._nsec;
+
+    // FIXME: Handle over/under-flow
+
+    return Duration(d);
+  }
+}
+
+/// Returns a `Time` representing the current point in time.
+def Now(): Time {
+  // FIXME: Handle failure
+  let ts: libc.timespec;
+  // FIXME: Macros are not exported by libc
+  libc.clock_gettime(libc._CLOCK_REALTIME, &ts);
+
+  // FIXME: Cleanup when we have record literals
+  let t: Time;
+  t._sec = ts.tv_sec;
+  t._nsec = ts.tv_nsec;
+
+  return t;
+}
+
+/// Returns a `Time` representing the current value of the clock.
+def Monotonic(): Time {
+  // FIXME: Handle failure
+  let ts: libc.timespec;
+  // FIXME: Macros are not exported by libc
+  libc.clock_gettime(libc._CLOCK_MONOTONIC_RAW, &ts);
+
+  // FIXME: Cleanup when we have record literals
+  let t: Time;
+  t._sec = ts.tv_sec;
+  t._nsec = ts.tv_nsec;
+
+  return t;
+}


adding test traces in MainModel for debug purposes


Change unit test XML format

Change unit test XML format

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/edward-yakop/flexmojos.git/'


274 uint version of ColorTransformUtil

274 uint version of ColorTransformUtil

error: pathspec 'raw/src/org/yellcorp/lib/color/IntColorTransformUtil.as' did not match any file(s) known to git

--- raw/src/org/yellcorp/lib/color/IntColorTransformUtil.as
+++ raw/src/org/yellcorp/lib/color/IntColorTransformUtil.as
@@ -0,0 +1,284 @@
+package org.yellcorp.lib.color
+{
+import flash.display.BitmapDataChannel;
+import flash.geom.ColorTransform;
+
+
+public class IntColorTransformUtil
+{
+    public static const SCALE:Number = 255;
+    public static const INVSCALE:Number = 1 / 255;
+
+    public static function copyColorMatrix(m:Array, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        out.redMultiplier   = m[0];
+        out.greenMultiplier = m[6];
+        out.blueMultiplier  = m[12];
+        out.alphaMultiplier = m[18];
+        out.redOffset       = m[4];
+        out.greenOffset     = m[9];
+        out.blueOffset      = m[14];
+        out.alphaOffset     = m[19];
+
+        return out;
+    }
+
+    public static function clear(out:ColorTransform):ColorTransform
+    {
+        out.redMultiplier   =
+        out.greenMultiplier =
+        out.blueMultiplier  =
+        out.alphaMultiplier = 1;
+        out.redOffset       =
+        out.greenOffset     =
+        out.blueOffset      =
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setInvert(out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        out.redMultiplier   = -1;
+        out.greenMultiplier = -1;
+        out.blueMultiplier  = -1;
+        out.alphaMultiplier = 1;
+
+        out.redOffset       = 255;
+        out.greenOffset     = 255;
+        out.blueOffset      = 255;
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setMultiply(c:uint, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        var r:Number = (c >> 16) & 0xFF;
+        var g:Number = (c >> 8) & 0xFF;
+        var b:Number = c & 0xFF;
+
+        out.redMultiplier   = r * INVSCALE;
+        out.greenMultiplier = g * INVSCALE;
+        out.blueMultiplier  = b * INVSCALE;
+        out.alphaMultiplier = 1;
+
+        out.redOffset       =
+        out.greenOffset     =
+        out.blueOffset      =
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setAdd(c:uint, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        var r:Number = (c >> 16) & 0xFF;
+        var g:Number = (c >> 8) & 0xFF;
+        var b:Number = c & 0xFF;
+
+        out.redMultiplier   =
+        out.greenMultiplier =
+        out.blueMultiplier  =
+        out.alphaMultiplier = 1;
+
+        out.redOffset       = r;
+        out.greenOffset     = g;
+        out.blueOffset      = b;
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setScreen(c:uint, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        var r:int = (c >> 16) & 0xFF;
+        var g:int = (c >> 8) & 0xFF;
+        var b:int = c & 0xFF;
+
+        out.redMultiplier   = 1 - r * INVSCALE;
+        out.greenMultiplier = 1 - g * INVSCALE;
+        out.blueMultiplier  = 1 - b * INVSCALE;
+        out.alphaMultiplier = 1;
+
+        out.redOffset       = r;
+        out.greenOffset     = g;
+        out.blueOffset      = b;
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setTint(c:uint, amount:Number = 1.0, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        var r:int = (c >> 16) & 0xFF;
+        var g:int = (c >> 8) & 0xFF;
+        var b:int = c & 0xFF;
+
+        out.redMultiplier   =
+        out.greenMultiplier =
+        out.blueMultiplier  = 1 - amount;
+        out.alphaMultiplier = 1;
+
+        out.redOffset       = r * amount;
+        out.greenOffset     = g * amount;
+        out.blueOffset      = b * amount;
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setMap(newBlack:uint, newWhite:uint, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        var br:int = (newBlack >> 16) & 0xFF;
+        var bg:int = (newBlack >> 8) & 0xFF;
+        var bb:int = newBlack & 0xFF;
+
+        var wr:int = (newWhite >> 16) & 0xFF;
+        var wg:int = (newWhite >> 8) & 0xFF;
+        var wb:int = newWhite & 0xFF;
+
+        out.redMultiplier   = (wr - br) * INVSCALE;
+        out.greenMultiplier = (wg - bg) * INVSCALE;
+        out.blueMultiplier  = (wb - bb) * INVSCALE;
+        out.alphaMultiplier = 1;
+
+        out.redOffset       = br;
+        out.greenOffset     = bg;
+        out.blueOffset      = bb;
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setRangeMap(fromLow:uint, fromHigh:uint,
+                                       toLow:uint,   toHigh:uint,
+                                       out:ColorTransform = null):ColorTransform
+    {
+
+        var fr0:int = (fromLow >> 16) & 0xFF;
+        var fg0:int = (fromLow >> 8) & 0xFF;
+        var fb0:int = fromLow & 0xFF;
+
+        var fr1:int = (fromHigh >> 16) & 0xFF;
+        var fg1:int = (fromHigh >> 8) & 0xFF;
+        var fb1:int = fromHigh & 0xFF;
+
+        var tr0:int = (toLow >> 16) & 0xFF;
+        var tg0:int = (toLow >> 8) & 0xFF;
+        var tb0:int = toLow & 0xFF;
+
+        var tr1:int = (toHigh >> 16) & 0xFF;
+        var tg1:int = (toHigh >> 8) & 0xFF;
+        var tb1:int = toHigh & 0xFF;
+
+        if (!out) out = new ColorTransform();
+
+        // this elaborate dance is to absorb div/0 errors.  considered
+        // throwing an exception or letting NaNs propagate, but because the
+        // output range is clamped, +/-Inf can be swapped for any
+        // appropriately out-of-range finite number.  this plus plenty of
+        // conceivable use cases where inRange = 0 makes it possible to
+        // fix the input values instead of rejecting them
+
+        var scaleR:Number = (fr1 - fr0);
+        var scaleG:Number = (fg1 - fg0);
+        var scaleB:Number = (fb1 - fb0);
+
+        // this magic number is taken from the maximum multiplier before
+        // ColorMatrixFilter ditches SSE acceleration.  even though this
+        // is a ColorTransform instead but it's a reasonable assumption
+
+        // this number means a 1 or -1 difference in the target range will
+        // scale to +/-4000, then get divided by 255 to get a multiplier of
+        // +/-15.686.  SSE is ditched at +/-15.99
+        if (scaleR == 0) scaleR = 0.00025;
+        if (scaleG == 0) scaleG = 0.00025;
+        if (scaleB == 0) scaleB = 0.00025;
+
+        scaleR = (tr1 - tr0) / scaleR;
+        scaleG = (tg1 - tg0) / scaleG;
+        scaleB = (tb1 - tb0) / scaleB;
+
+        out.redMultiplier   = ((255 - fr0) * scaleR + tr0) * INVSCALE;
+        out.greenMultiplier = ((255 - fg0) * scaleG + tg0) * INVSCALE;
+        out.blueMultiplier  = ((255 - fb0) * scaleB + tb0) * INVSCALE;
+        out.alphaMultiplier = 1;
+
+        out.redOffset       = -fr0 * scaleR + tr0;
+        out.greenOffset     = -fg0 * scaleG + tg0;
+        out.blueOffset      = -fb0 * scaleB + tb0;
+        out.alphaOffset     = 0;
+
+        return out;
+    }
+
+    public static function setLevels(blackPoint:Number, whitePoint:Number, channels:uint = 7, out:ColorTransform = null):ColorTransform
+    {
+        if (!out) out = new ColorTransform();
+
+        var factor:Number = 255 / (whitePoint - blackPoint);
+        var offset:Number = -blackPoint * factor;
+
+        if (channels & BitmapDataChannel.RED)
+        {
+            out.redMultiplier = factor;
+            out.redOffset = offset;
+        }
+        else
+        {
+            out.redMultiplier = 1;
+            out.redOffset = 0;
+        }
+
+        if (channels & BitmapDataChannel.GREEN)
+        {
+            out.greenMultiplier = factor;
+            out.greenOffset = offset;
+        }
+        else
+        {
+            out.greenMultiplier = 1;
+            out.greenOffset = 0;
+        }
+
+        if (channels & BitmapDataChannel.BLUE)
+        {
+            out.blueMultiplier = factor;
+            out.blueOffset = offset;
+        }
+        else
+        {
+            out.blueMultiplier = 1;
+            out.blueOffset = 0;
+        }
+
+        if (channels & BitmapDataChannel.ALPHA)
+        {
+            out.alphaMultiplier = factor;
+            out.alphaOffset = offset;
+        }
+        else
+        {
+            out.alphaMultiplier = 1;
+            out.alphaOffset = 0;
+        }
+
+        return out;
+    }
+}
+}


removing isCC boolean

removing isCC boolean

--- src/org/mangui/hls/flv/FLVTag.as
+++ src/org/mangui/hls/flv/FLVTag.as
@@ -35,8 +35,6 @@
         /** Type of FLV tag.**/
         public var type : int;

-        public var isCC : Boolean = false;
-
         /** Get the FLV file header. **/
         public static function getHeader() : ByteArray {
             var flv : ByteArray = new ByteArray();


Dropped particle system.  Implement http://wiki.starling-framework.org/extensions/particlesystem

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/c0d3m0nk3y/Konata.git/'


RandomUtil.

RandomUtil.

git-svn-id: a1a4b28b82a3276cc491891159dd9963a0a72fae@4983 542714f4-19e9-0310-aa3c-eee0fc999fb1

error: pathspec 'src/as/com/threerings/util/RandomUtil.as' did not match any file(s) known to git

--- src/as/com/threerings/util/RandomUtil.as
+++ src/as/com/threerings/util/RandomUtil.as
@@ -0,0 +1,40 @@
+//
+// $Id$
+
+package com.threerings.util {
+
+/**
+ * Random Random utilities.
+ */
+public class RandomUtil
+{
+    /**
+     * Return the picked index from a weighted list.
+     *
+     * @param weights an Array containing Numbers, ints, or uints. All values should be
+     * non-negative.
+     * @param a random function that returns (0 <= value < 1), if null then Math.random() will
+     * be used.
+     */
+    public static function getWeightedIndex (weights :Array, randomFn :Function = null) :int
+    {
+        var sum :Number = 0;
+        for each (var n :Number in weights) {
+            sum += n;
+        }
+        if (sum < 0) {
+            return -1;
+        }
+        var pick :Number = ((randomFn == null) ? Math.random() : randomFn()) * sum;
+        for (var ii :int = 0; ii < weights.length; ii++) {
+            pick -= Number(weights[ii]);
+            if (pick < 0) {
+                return ii;
+            }
+        }
+
+        // since we're dealing with floats, it's possible that a rounding error left us here
+        return 0; // TODO: largest weighted? Re-pick?
+    }
+}
+}


readded my beloved size class

readded my beloved size class

git-svn-id: e38e7cdd6ace00d8230583a2d3b43e9a55f5c011@629 bc4816be-ef27-423a-9c4d-fc420be121a2

error: pathspec 'src/reprise/data/Size.as' did not match any file(s) known to git


We automatically remove ourselves from the Collidables collection when disposed. Tidied up some logic.


Added xiff_internal namespace.

Added xiff_internal namespace.

git-svn-id: c197267f952b24206666de142881703007ca05d5@12863 b35dd754-fafc-0310-a699-88a17e54d16e

error: pathspec 'src/org/igniterealtime/xiff/namespaces/xiff_internal.as' did not match any file(s) known to git

--- src/org/igniterealtime/xiff/namespaces/xiff_internal.as
+++ src/org/igniterealtime/xiff/namespaces/xiff_internal.as
@@ -0,0 +1,4 @@
+package org.igniterealtime.xiff.namespaces
+{
+	public namespace xiff_internal = "http://www.igniterealtime.org/namespace/xiff/internal";
+}


Removed BlendMode.NONE for grass to enable transparency of blades.


Develop

Develop

error: pathspec 'src/main/org/shypl/common/util/Cookies.as' did not match any file(s) known to git

--- src/main/org/shypl/common/util/Cookies.as
+++ src/main/org/shypl/common/util/Cookies.as
@@ -0,0 +1,58 @@
+package org.shypl.common.util {
+	import flash.net.SharedObject;
+
+	public class Cookies {
+		private var _sharedObject:SharedObject;
+		private var _data:Object;
+
+		public function Cookies(storageName:String, sharedName:String = null) {
+			_sharedObject = SharedObject.getLocal(storageName, sharedName);
+			_data = _sharedObject.data;
+		}
+
+		public function set(name:String, value:Object):void {
+			_data[name] = value;
+			save();
+		}
+
+		public function get(name:String, defaultValue:Object = null):Object {
+			if (contains(name)) {
+				return _data[name];
+			}
+			return defaultValue;
+		}
+
+		public function remove(name:String):void {
+			delete _data[name];
+			save();
+		}
+
+		public function contains(name:String):Boolean {
+			return name in _data;
+		}
+
+		public function getBoolean(name:String, defaultValue:Boolean = null):Boolean {
+			return Boolean(get(name, defaultValue));
+		}
+
+		public function getInt(name:String, defaultValue:int = 0):int {
+			return int(get(name, defaultValue));
+		}
+
+		public function getUint(name:String, defaultValue:uint = 0):uint {
+			return uint(get(name, defaultValue));
+		}
+
+		public function getNumber(name:String, defaultValue:uint = 0):Number {
+			return Number(get(name, defaultValue));
+		}
+
+		public function getString(name:String, defaultValue:String = null):String {
+			return get(name, defaultValue) as String;
+		}
+
+		private function save():void {
+			_sharedObject.flush();
+		}
+	}
+}


New event class used to communicate the beginning and end of effects used in mdi framework

error: pathspec 'src/flexlib/mdi/events/MDIEffectEvent.as' did not match any file(s) known to git

--- src/flexlib/mdi/events/MDIEffectEvent.as
+++ src/flexlib/mdi/events/MDIEffectEvent.as
@@ -0,0 +1,35 @@
+package flexlib.mdi.events
+{
+	import mx.events.EffectEvent;
+
+	/**
+	 * Event class dispatched at beginning and end of mdi effects for things like minimize, maximize, etc.
+	 */
+	public class MDIEffectEvent extends EffectEvent
+	{
+		/**
+		 * Corresponds to type property of corresponding MDIManagerEvent.
+		 */
+		public var mdiEventType:String;
+
+		/**
+		 * List of windows involved in effect.
+		 */
+		public var windows:Array;
+
+		/**
+		 * Constructor
+		 *
+		 * @param eventType EffectEvent.EFFECT_START or EfectEvent.EFFECT_END
+		 * @param mdiEventType Corresponding mdi event type like minimize, maximize, tile, etc. Will be one of MDIManagerEvent's static types.
+		 * @param windows List of windows involved in effect. Will be a single element except for cascade and tile.
+		 */
+		public function MDIEffectEvent(eventType:String, mdiEventType:String, windows:Array)
+		{
+			super(eventType);
+
+			this.mdiEventType = mdiEventType;
+			this.windows = windows;
+		}
+	}
+}


Added the file that contains the logic for the concept generator.

error: pathspec 'src/logic/NaiveConceptProcessor.as' did not match any file(s) known to git

--- src/logic/NaiveConceptProcessor.as
+++ src/logic/NaiveConceptProcessor.as
@@ -0,0 +1,21 @@
+package logic
+{
+	import com.adobe.flex.extras.controls.springgraph.Graph;
+
+	import mx.collections.ArrayCollection;
+
+	public class NaiveConceptProcessor implements IConceptProcessor
+	{
+		public function NaiveConceptProcessor()
+		{
+		}
+
+		public function computeConcept(objects:Array, attributes:Array, data:ArrayCollection):Graph
+		{
+
+
+			return new Graph();
+		}
+
+	}
+}


Amended Event template to include clone method

error: pathspec 'Templates/Event' did not match any file(s) known to git
error: pathspec 'Subclass.tmTemplate/class.as' did not match any file(s) known to git


improving readability

improving readability


Create data class for testing: ClassLevelCloneableSubclass.

error: pathspec 'dolly-framework/src/test/resources/dolly/data/ClassLevelCloneableSubclass.as' did not match any file(s) known to git

--- dolly-framework/src/test/resources/dolly/data/ClassLevelCloneableSubclass.as
+++ dolly-framework/src/test/resources/dolly/data/ClassLevelCloneableSubclass.as
@@ -0,0 +1,24 @@
+package dolly.data {
+
+[Cloneable]
+public class ClassLevelCloneableSubclass extends ClassLevelCloneable {
+
+	private var _writableField2:String;
+
+	public var property4:String;
+	public var property5:String;
+
+	public function ClassLevelCloneableSubclass() {
+		super();
+	}
+
+	public function get writableField2():String {
+		return _writableField2;
+	}
+
+	public function set writableField2(value:String):void {
+		_writableField2 = value;
+	}
+
+}
+}


polishing comments

polishing comments

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/rafaelcordoba/cocktail-demo.git/'


Siner! The heart of the butterfly...

Siner! The heart of the butterfly...

git-svn-id: b675b909355d5cf946977f44a8ec5a6ceb3782e4@170 ed5b42cb-e716-0410-a449-f6a68f950b19

error: pathspec 'src/as/com/threerings/flash/Siner.as' did not match any file(s) known to git

--- src/as/com/threerings/flash/Siner.as
+++ src/as/com/threerings/flash/Siner.as
@@ -0,0 +1,92 @@
+package com.threerings.flash {
+
+import flash.utils.getTimer;
+
+/**
+ * Tracks multiple sine waves with different periods and amplitudes, and
+ * returns a
+ */
+public class Siner
+{
+    /**
+     * @param args: amplitude1, period1, amplitude2, period2...
+     * Periods are specified in seconds.
+     *
+     * If constructed with more than one amplitude, the amplitudes are
+     * additive.
+     *
+     * The Siner will start in the reset() state.
+     */
+    public function Siner (... args)
+    {
+        if (args.length == 0 || (args.length % 2 != 0)) {
+            throw new ArgumentError();
+        }
+        while (args.length > 0) {
+            if (!(args[0] is Number) || !(args[1] is Number)) {
+                throw new ArgumentError();
+            }
+            var amp :Number = args.shift();
+            var per :Number = args.shift();
+
+            _incs.push(TWO_PI / (per * 1000));
+            _amps.push(amp);
+        }
+        reset();
+    }
+
+    /**
+     * Reset to 0, with the amplitude about to increase.
+     */
+    public function reset () :void
+    {
+        for (var ii :int = _amps.length - 1; ii >= 0; ii--) {
+            _values[ii] = 3 * Math.PI / 2;
+        }
+        _stamp = getTimer();
+    }
+
+    /**
+     * Randomize the value.
+     */
+    public function randomize () :void
+    {
+        for (var ii :int = _amps.length - 1; ii >= 0; ii--) {
+            _values[ii] = Math.random() * TWO_PI;
+        }
+    }
+
+    /**
+     * Access the instantaneous value, which can range from
+     * [ -totalAmplitude, totalAmplitude ].
+     *
+     * Note: timestamps are only kept relative to the last access of the value,
+     * and floating point math is used, so things could get a little "off" after
+     * a while, and the frequency with which you sample the value will impact
+     * the error. You cope.
+     */
+    public function get value () :Number
+    {
+        var now :Number = getTimer();
+        var elapsed :Number = now - _stamp;
+        _stamp = now;
+
+        var accum :Number = 0;
+        for (var ii :int = _values.length - 1; ii >= 0; ii--) {
+            var val :Number = (_values[ii] + (_incs[ii] * elapsed)) % TWO_PI;
+            _values[ii] = val;
+            accum += _amps[ii] * Math.sin(val);
+        }
+        return accum;
+    }
+
+    protected var _values :Array = [];
+    protected var _incs :Array = [];
+    protected var _amps :Array = [];
+
+    protected var _stamp :Number;
+
+    protected static const TWO_PI :Number = 2 * Math.PI;
+}
+
+}


Bug 557933: Add acceptance test (w=stejohns, r=lhansen, sr=edwsmith)

error: pathspec 'test/acceptance/regress/bug_557933.as' did not match any file(s) known to git

--- test/acceptance/regress/bug_557933.as
+++ test/acceptance/regress/bug_557933.as
@@ -0,0 +1,110 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is [Open Source Virtual Machine].
+ *
+ * The Initial Developer of the Original Code is
+ * Adobe System Incorporated.
+ * Portions created by the Initial Developer are Copyright (C) 2010
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK *****
+*
+*
+* See http://bugzilla.mozilla.org/show_bug.cgi?id=557933
+*
+*/
+//-----------------------------------------------------------------------------
+
+var SECTION = "557933";
+var VERSION = "";
+var TITLE   = "parseIndex/getIntItem reject leading zeroes";
+var bug = "557933";
+
+startTest();
+writeHeaderToLog(SECTION + " " + TITLE);
+var testcases = getTestCases();
+test();
+
+function concat_strs(a,b)
+{
+    return a + b;
+}
+
+function getTestCases() {
+    var array:Array = new Array();
+    var item:int = 0;
+
+    var tests = [
+        { key: 9,                       expect: 1 },
+        { key: "9",                     expect: 1 },
+        { key: "09",                    expect: 31 },
+        { key: "009",                   expect: 3 },
+        { key: "0009",                  expect: 4 },
+        { key: 8,                       expect: 8 },
+        { key: 0x8,                     expect: 8 },
+        { key: 0x08,                    expect: 8 },
+        { key: "8",                     expect: 8 },
+        { key: "0x8",                   expect: 9 },
+        { key: "0x08",                  expect: 10 },
+        { key: -7,                      expect: 14 },
+        { key: -07,                     expect: 14 },
+        { key: -007,                    expect: 14 },
+        { key: "-7",                    expect: 14 },
+        { key: "-07",                   expect: 15 },
+        { key: "-007",                  expect: 16 },
+        { key: 6,                       expect: 24 },
+        { key: 6.0,                     expect: 24 },
+        { key: 6.00,                    expect: 24 },
+        { key: 06.0,                    expect: 24 },
+        { key: 06.00,                   expect: 24 },
+        { key: 006.0,                   expect: 24 },
+        { key: 006.00,                  expect: 24 },
+        { key: "6",                     expect: 24 },
+        { key: "6.0",                   expect: 25 },
+        { key: "6.00",                  expect: 26 },
+        { key: "06.0",                  expect: 27 },
+        { key: "06.00",                 expect: 28 },
+        { key: "006.0",                 expect: 29 },
+        { key: "006.00",                expect: 30 },
+        { key: concat_strs("0","9"),    expect: 31 },
+    ]
+
+    var o:* = []; // must be type *, not Array
+
+    for (var i = 0; i < tests.length; ++i)
+    {
+        o[tests[i].key] = i;
+    }
+
+    for (var i = 0; i < tests.length; ++i)
+    {
+        array[item++] = new TestCase(SECTION, String(item) + ": " + typeof(tests[i].key) + " " + String(tests[i].key), tests[i].expect, o[tests[i].key]);
+    }
+
+    return array;
+}


Create new test class CopyingOfCopyableSubclassTest for testing of creation copies for CopyableSubclass.

error: pathspec 'dolly-framework/src/test/actionscript/dolly/CopyingOfCopyableSubclassTest.as' did not match any file(s) known to git

--- dolly-framework/src/test/actionscript/dolly/CopyingOfCopyableSubclassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CopyingOfCopyableSubclassTest.as
@@ -0,0 +1,70 @@
+package dolly {
+
+import dolly.core.dolly_internal;
+import dolly.data.CopyableSubclass;
+
+import org.as3commons.reflect.Field;
+import org.as3commons.reflect.Type;
+import org.flexunit.asserts.assertEquals;
+import org.flexunit.asserts.assertNotNull;
+
+use namespace dolly_internal;
+
+public class CopyingOfCopyableSubclassTest {
+
+	private var copyableSubclass:CopyableSubclass;
+	private var copyableSubclassType:Type;
+
+	[Before]
+	public function before():void {
+		copyableSubclass = new CopyableSubclass();
+		copyableSubclass.property1 = "property1 value";
+		copyableSubclass.property2 = "property2 value";
+		copyableSubclass.writableField1 = "writableField1 value";
+		copyableSubclass.writableField2 = "writableField2 value 7";
+		copyableSubclassType = Type.forInstance(copyableSubclass);
+	}
+
+	[After]
+	public function after():void {
+		copyableSubclass = null;
+		copyableSubclassType = null;
+	}
+
+	[Test]
+	public function findingAllCopyableFieldsForType():void {
+		const copyableFields:Vector.<Field> = Copier.findCopyableFieldsForType(copyableSubclassType);
+		assertNotNull(copyableFields);
+		assertEquals(4, copyableFields.length);
+		assertNotNull(copyableFields[0]);
+		assertNotNull(copyableFields[1]);
+		assertNotNull(copyableFields[2]);
+		assertNotNull(copyableFields[3]);
+	}
+
+	[Test]
+	public function copyingByCopier():void {
+		const copyInstance:CopyableSubclass = Copier.copy(copyableSubclass);
+		assertNotNull(copyInstance);
+		assertNotNull(copyInstance.property1);
+		assertEquals(copyInstance.property1, copyableSubclass.property1);
+		assertNotNull(copyInstance.writableField1);
+		assertEquals(copyInstance.writableField1, copyableSubclass.writableField1);
+		assertNotNull(copyInstance.writableField2);
+		assertEquals(copyInstance.writableField2, copyableSubclass.writableField2);
+	}
+
+	[Test]
+	public function copyingByCopyFunction():void {
+		const copyInstance:CopyableSubclass = copy(copyableSubclass);
+		assertNotNull(copyInstance);
+		assertNotNull(copyInstance.property1);
+		assertEquals(copyInstance.property1, copyableSubclass.property1);
+		assertNotNull(copyInstance.writableField1);
+		assertEquals(copyInstance.writableField1, copyableSubclass.writableField1);
+		assertNotNull(copyInstance.writableField2);
+		assertEquals(copyInstance.writableField2, copyableSubclass.writableField2);
+	}
+
+}
+}


fixed path problem

fixed path problem


Add android4 specific TextSkinBase

Add android4 specific TextSkinBase

error: pathspec 'frameworks/projects/mobiletheme/src/spark/skins/android4/supportClasses/TextSkinBase.as' did not match any file(s) known to git

--- frameworks/projects/mobiletheme/src/spark/skins/android4/supportClasses/TextSkinBase.as
+++ frameworks/projects/mobiletheme/src/spark/skins/android4/supportClasses/TextSkinBase.as
@@ -0,0 +1,213 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package spark.skins.android4.supportClasses
+{
+
+	import flash.display.DisplayObject;
+
+	import mx.core.mx_internal;
+
+	import spark.components.supportClasses.StyleableTextField;
+	import spark.skins.mobile.supportClasses.MobileSkin;
+
+	use namespace mx_internal;
+
+	/**
+	 *  ActionScript-based skin for text input controls in mobile applications that
+	 *  uses a StyleableTextField class for the text display.
+	 *
+	 *  @see spark.components.supportClasses.StyleableTextField
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 2.5
+	 *  @productversion Flex 4.5
+	 */
+	public class TextSkinBase extends MobileSkin
+	{
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+		/**
+		 *  Constructor.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 *
+		 */
+		public function TextSkinBase()
+		{
+			super();
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Graphics variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Defines the border.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+
+		//--------------------------------------------------------------------------
+		//
+		//  Layout variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Defines the corner radius.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 2.5
+		 *  @productversion Flex 4.5
+		 */
+
+		protected var layoutBorderSize:uint;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 *
+		 *  Instance of the border graphics.
+		 */
+		protected var border:DisplayObject;
+
+		private var borderVisibleChanged:Boolean = false;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Skin parts
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  textDisplay skin part.
+		 */
+		public var textDisplay:StyleableTextField;
+
+		[Bindable]
+		/**
+		 *  Bindable promptDisplay skin part. Bindings fire when promptDisplay is
+		 *  removed and added for proper updating by the SkinnableTextBase.
+		 */
+		public var promptDisplay:StyleableTextField;
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 */
+		override protected function createChildren():void
+		{
+			super.createChildren();
+
+			if (!textDisplay)
+			{
+				textDisplay = StyleableTextField(createInFontContext(StyleableTextField));
+				textDisplay.styleName = this;
+				textDisplay.editable = true;
+				textDisplay.useTightTextBounds = false;
+				addChild(textDisplay);
+			}
+		}
+
+		/**
+		 *  @private
+		 */
+		protected function createPromptDisplay():StyleableTextField
+		{
+			var prompt:StyleableTextField = StyleableTextField(createInFontContext(StyleableTextField));
+			prompt.styleName = this;
+			prompt.editable = false;
+			prompt.mouseEnabled = false;
+			prompt.useTightTextBounds = false;
+			prompt.focusEnabled = false;
+			return prompt;
+		}
+
+		/**
+		 *  @private
+		 */
+
+		override public function styleChanged(styleProp:String):void
+		{
+			var allStyles:Boolean = !styleProp || styleProp == "styleName";
+
+			if (allStyles || styleProp == "borderVisible")
+			{
+				borderVisibleChanged = true;
+				invalidateProperties();
+			}
+
+			if (allStyles || styleProp.indexOf("padding") == 0)
+			{
+				invalidateDisplayList();
+			}
+
+			super.styleChanged(styleProp);
+		}
+
+		/**
+		 *  @private
+		 */
+		override protected function commitCurrentState():void
+		{
+			super.commitCurrentState();
+
+			alpha = currentState.indexOf("disabled") == -1 ? 1 : 0.5;
+
+			var showPrompt:Boolean = currentState.indexOf("WithPrompt") >= 0;
+
+			if (showPrompt && !promptDisplay)
+			{
+				promptDisplay = createPromptDisplay();
+				addChild(promptDisplay);
+			}
+			else if (!showPrompt && promptDisplay)
+			{
+				removeChild(promptDisplay);
+				promptDisplay = null;
+			}
+
+			invalidateDisplayList();
+		}
+	}
+}


git-svn-id: http://svn.rails2u.com/as3rails2u/trunk@4 96db6a20-122f-0410-8d9f-89437bbe4005

error: pathspec 'tests/TestKeyTypeListener.as' did not match any file(s) known to git

--- tests/TestKeyTypeListener.as
+++ tests/TestKeyTypeListener.as
@@ -0,0 +1,164 @@
+package
+{
+    import flash.display.Sprite;
+    import org.libspark.as3unit.runner.AS3UnitCore;
+
+    public class TestKeyTypeListener extends Sprite
+    {
+        public function TestKeyTypeListener() {
+            AS3UnitCore.main(TestKeyTypeListenerImpl);
+        }
+    }
+}
+
+import org.libspark.as3unit.test;
+import org.libspark.as3unit.before;
+import org.libspark.as3unit.after;
+use namespace test;
+use namespace before;
+use namespace after;
+
+import org.libspark.as3unit.assert.assertEquals;
+import org.libspark.as3unit.assert.assertTrue;
+
+import com.rails2u.utils.KeyTypeListener;
+import com.rails2u.utils.key_down;
+import flash.events.KeyboardEvent;
+
+import flash.display.Sprite;
+import flash.ui.Keyboard;
+import org.libspark.as3unit.assert.assertFalse;
+
+use namespace key_down;
+
+class TestKeyTypeListenerImpl
+{
+    private var down:String = KeyboardEvent.KEY_DOWN;
+    private var up:String = KeyboardEvent.KEY_UP;
+
+    before function setup():void {
+    }
+
+    test function mainKeydown():void
+    {
+        var result:Array = [];
+        var sprite:Sprite = new TestSprite(result);
+        KeyTypeListener.attach(sprite);
+
+        var events:Array = [];
+        var e:KeyboardEvent;
+
+        events.push(['F1', keyEvent(down, Keyboard.F1)]);
+        events.push(['INSERT', keyEvent(down, Keyboard.INSERT)]);
+        events.push(['DOWN', keyEvent(down, Keyboard.DOWN)]);
+        events.push(['a', keyEvent(down, 65)]); // 65 is a
+        events.push(['0', keyEvent(down, '0')]);
+        events.push(['3', keyEvent(down, '3')]);
+        e = keyEvent(down, 65);
+        e.shiftKey = true;
+        events.push(['A', e]);
+
+        e = keyEvent(down, 65);
+        e.ctrlKey = true;
+        events.push(['CTRL_a', e]);
+
+        e = keyEvent(down, 65);
+        e.shiftKey = true;
+        e.ctrlKey = true;
+        events.push(['CTRL_A', e]);
+
+        var myResult:Array = [];
+        for each (var pair:Array in events) {
+            myResult.push(pair.shift());
+            sprite.dispatchEvent(pair.shift());
+        }
+        log(result, myResult);
+        assertEquals(myResult.sort(), result.sort());
+    }
+
+    test function destroy1():void
+    {
+        var sprite:Sprite = new TestSprite([]);
+        KeyTypeListener.attach(sprite);
+        KeyTypeListener.detach(sprite);
+
+        assertFalse(sprite.hasEventListener(KeyboardEvent.KEY_DOWN));
+        assertFalse(sprite.hasEventListener(KeyboardEvent.KEY_UP));
+        log('destroy1');
+    }
+
+    test function destroy2():void
+    {
+        var sprite:Sprite = new TestSprite([]);
+        var k:KeyTypeListener = KeyTypeListener.attach(sprite);
+        k.destroy();
+        assertFalse(sprite.hasEventListener(KeyboardEvent.KEY_DOWN));
+        assertFalse(sprite.hasEventListener(KeyboardEvent.KEY_UP));
+        log('destroy2');
+    }
+
+    private function keyEvent(type:String, code:*):KeyboardEvent {
+        if(code is String) code = String(code).charCodeAt(0);
+        code = uint(code);
+        return new KeyboardEvent(type, true, false, code, code);
+    }
+
+    after function tearDown():void {
+    }
+}
+
+class KeyError extends Error {
+    public function KeyError(s:String) {
+        super(s);
+    }
+}
+
+class TestSprite extends Sprite {
+    private var result:Array;
+
+    public function TestSprite(result:Array) {
+        super();
+        this.result = result;
+    }
+
+    key_down function F1():void {
+        result.push('F1');
+    }
+
+    key_down function INSERT(e:KeyboardEvent):void {
+        result.push('INSERT');
+    }
+
+    key_down function DOWN(e:KeyboardEvent):void {
+        result.push('DOWN');
+    }
+
+    key_down function _0():void {
+        result.push('0');
+    }
+
+    key_down function _3():void {
+        result.push('3');
+    }
+
+    key_down function a():void {
+        result.push('a');
+    }
+
+    key_down function A():void {
+        result.push('A');
+    }
+
+    key_down function CTRL_a():void {
+        result.push('CTRL_a');
+    }
+
+    key_down function CTRL_A(e:KeyboardEvent):void {
+        result.push('CTRL_A');
+    }
+
+    key_down function CTRL_1():void {
+        result.push('CTRL_1');
+    }
+}
+


add other DataGrid classes from examples/DataGridXCompile for cross-compilation

error: pathspec 'frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as' did not match any file(s) known to git

--- frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as
+++ frameworks/as/projects/FlexJSJX/src/org/apache/flex/html/staticControls/beads/IDataProviderItemRendererMapper.as
@@ -0,0 +1,34 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.staticControls.beads
+{
+	import org.apache.flex.core.IBead;
+	import org.apache.flex.core.IItemRendererClassFactory;
+
+    /**
+     * Classes that generate ItemRenderers based on dataProvider contents.
+     * These classes use an IItemRendererFactory to generate the actual
+     * ItemRenderer instances
+     */
+	public interface IDataProviderItemRendererMapper extends IBead
+	{
+        function get itemRendererFactory():IItemRendererClassFactory;
+        function set itemRendererFactory(value:IItemRendererClassFactory):void;
+	}
+}


fixed the ambiguous append behaviour.

fixed the ambiguous append behaviour.

now it can recevei a slave with or withouy a delist


added FabricationLoggerChannel

added FabricationLoggerChannel

error: pathspec 'src/org/puremvc/as3/multicore/utilities/fabrication/logging/channel/FabricationLoggerChannel.as' did not match any file(s) known to git

--- src/org/puremvc/as3/multicore/utilities/fabrication/logging/channel/FabricationLoggerChannel.as
+++ src/org/puremvc/as3/multicore/utilities/fabrication/logging/channel/FabricationLoggerChannel.as
@@ -0,0 +1,98 @@
+/**
+ * Copyright (C) 2010 Rafał Szemraj.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.puremvc.as3.multicore.utilities.fabrication.logging.channel {
+
+
+    import flash.events.SecurityErrorEvent;
+    import flash.events.StatusEvent;
+    import flash.net.LocalConnection;
+
+    import flash.utils.ByteArray;
+
+    import org.puremvc.as3.multicore.utilities.fabrication.logging.FabricationLogger;
+    import org.puremvc.as3.multicore.utilities.fabrication.logging.LogLevel;
+
+    public class FabricationLoggerChannel implements ILogChannel {
+
+        private static var _instance:FabricationLoggerChannel;
+        private var lc:LocalConnection;
+
+        public static function getInstance():FabricationLoggerChannel
+        {
+
+            return _instance ? _instance : _instance = new FabricationLoggerChannel(new SingletonEnforcer());
+        }
+
+        public function FabricationLoggerChannel(se:SingletonEnforcer)
+        {
+            if (null == se) {
+                throw new Error("Private constructor invocation error");
+            }
+            lc = new LocalConnection();
+            lc.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onSecurityError, false, 0, true);
+            lc.addEventListener(StatusEvent.STATUS, onStatusEvent, false, 0, true);
+        }
+
+        /**
+         * Logs given message at given log level, loggingObject is threaten as source of message
+         * @param message messafge to log
+         * @param logLevel level at wich message will be logged
+         * @param loggingObject source of message [ optional ]
+         */
+        public function log(message:*, logLevel:LogLevel, loggingObject:String):void
+        {
+
+            lc.send( FabricationLogger.LOGGER_ID, "logMessage", "" + loggingObject + " : " + message, logLevel.getName());
+        }
+
+        /**
+         * Inspects object ( eg. shows its structure in tree, datagrid etc ). How this method works
+         * depends on log channel inspectObject method implementation. Important - remember, it shows only dynamic
+         * properties of object. To show whole information use as3 flash.utils.describeType.
+         * @param object object to inspect
+         * @param objectName name of object. You can pass any string that distinguish current object from others,
+         * if ommit "object" is set. [ optional ]
+         * @see Logger
+         */
+        public function inspectObject(object:*, objectName:String = "object"):void
+        {
+
+            var ba:ByteArray = new ByteArray();
+            ba.writeObject( object );
+            ba.compress();
+            lc.send(FabricationLogger.LOGGER_ID, "inspectObject", ba );
+        }
+
+        /**
+         * Clears channel's output.
+         */
+        public function clearOutput():void
+        {
+        }
+
+        private function onSecurityError(event:SecurityErrorEvent):void
+        {
+        }
+
+        private function onStatusEvent(event:StatusEvent):void
+        {
+        }
+    }
+}
+
+class SingletonEnforcer {
+}


new coordinate attribute form item

new coordinate attribute form item

error: pathspec 'collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/detail/CoordinateAttributeFormItem.as' did not match any file(s) known to git

--- collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/detail/CoordinateAttributeFormItem.as
+++ collect-flex/collect-flex-client/src/main/flex/org/openforis/collect/ui/component/detail/CoordinateAttributeFormItem.as
@@ -0,0 +1,71 @@
+package org.openforis.collect.ui.component.detail {
+	import mx.containers.FormItem;
+	import mx.core.IVisualElementContainer;
+
+	import org.openforis.collect.i18n.Message;
+	import org.openforis.collect.ui.component.input.InputField;
+
+	import spark.components.DropDownList;
+
+	public class CoordinateAttributeFormItem extends AttributeFormItem implements CollectFormItem {
+
+		private var _isInDataGroup:Boolean;
+
+		private var _srsDropDownList:DropDownList;
+		private var _xInputField:InputField;
+		private var _yInputField:InputField;
+
+		public function CoordinateAttributeFormItem(isInDataGroup:Boolean = false) {
+			super();
+			this._isInDataGroup = isInDataGroup;
+			_srsDropDownList = createSRSDropDownList();
+			_xInputField = createXInputField();
+			_yInputField = createYInputField();
+		}
+
+		override public function add(parent:IVisualElementContainer):void {
+			if(this._isInDataGroup) {
+				parent.addElement(_srsDropDownList);
+				parent.addElement(_xInputField);
+				parent.addElement(_yInputField);
+			} else {
+				var formItem:FormItem;
+				//srs
+				formItem = new FormItem();
+				formItem.label = Message.get('edit.coordinate.srs');
+				formItem.addElement(_srsDropDownList);
+				parent.addElement(formItem);
+				//x
+				formItem = new FormItem();
+				formItem.label = Message.get('edit.coordinate.x');
+				formItem.addElement(_xInputField);
+				parent.addElement(formItem);
+				//y
+				formItem = new FormItem();
+				formItem.label = Message.get('edit.coordinate.y');
+				formItem.addElement(_yInputField);
+				parent.addElement(formItem);
+			}
+		}
+
+		private function createSRSDropDownList():DropDownList {
+			var result:DropDownList = new DropDownList();
+			result.id = "srsDropDownList";
+			result.prompt = Message.get("global.dropDownPrompt");
+			return result;
+		}
+
+		private function createXInputField():InputField {
+			var result:InputField = new InputField();
+			result.id = "xInputField";
+			return result;
+		}
+
+		private function createYInputField():InputField {
+			var result:InputField = new InputField();
+			result.id = "yInputField";
+			return result;
+		}
+
+	}
+}


Add empty test for PropertyUtil class.

Add empty test for PropertyUtil class.

error: pathspec 'dolly-framework/src/test/actionscript/dolly/utils/PropertyUtilTests.as' did not match any file(s) known to git

--- dolly-framework/src/test/actionscript/dolly/utils/PropertyUtilTests.as
+++ dolly-framework/src/test/actionscript/dolly/utils/PropertyUtilTests.as
@@ -0,0 +1,29 @@
+package dolly.utils {
+import dolly.core.dolly_internal;
+
+import mx.collections.ArrayCollection;
+import mx.collections.ArrayList;
+
+use namespace dolly_internal;
+
+public class PropertyUtilTests {
+
+	private var sourceObj:Object;
+	private var targetObj:Object;
+
+	[Before]
+	public function before():void {
+		sourceObj = {};
+		sourceObj.array = [0, 1, 2, 3, 4];
+		sourceObj.arrayList = new ArrayList([0, 1, 2, 3, 4]);
+		sourceObj.arrayCollection = new ArrayCollection([0, 1, 2, 3, 4]);
+
+		targetObj = {};
+	}
+
+	[After]
+	public function after():void {
+		sourceObj = targetObj = null;
+	}
+}
+}


Add new test data class: CompositeCloneableClass.

error: pathspec 'dolly-framework/src/test/resources/dolly/data/CompositeCloneableClass.as' did not match any file(s) known to git

--- dolly-framework/src/test/resources/dolly/data/CompositeCloneableClass.as
+++ dolly-framework/src/test/resources/dolly/data/CompositeCloneableClass.as
@@ -0,0 +1,19 @@
+package dolly.data {
+import mx.collections.ArrayCollection;
+import mx.collections.ArrayList;
+
+[Cloneable]
+public class CompositeCloneableClass {
+
+	public var cloneable:CloneableClass = new CloneableClass();
+
+	public var array:Array = [0, 1, 2, 3, 4];
+
+	public var arrayList:ArrayList = new ArrayList([0, 1, 2, 3, 4]);
+
+	public var arrayCollection:ArrayCollection = new ArrayCollection([0, 1, 2, 3, 4]);
+
+	public function CompositeCloneableClass() {
+	}
+}
+}


Issue 83; Improve parsing for <line> attributes.

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/leymannx/svgweb.git/'


created WeaveContextMenu.as

created WeaveContextMenu.as

error: pathspec 'WeaveUISpark/src/weave/menus/WeaveContextMenu.as' did not match any file(s) known to git

--- WeaveUISpark/src/weave/menus/WeaveContextMenu.as
+++ WeaveUISpark/src/weave/menus/WeaveContextMenu.as
@@ -0,0 +1,108 @@
+/*
+Weave (Web-based Analysis and Visualization Environment)
+Copyright (C) 2008-2011 University of Massachusetts Lowell
+
+This file is a part of Weave.
+
+Weave is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License, Version 3,
+as published by the Free Software Foundation.
+
+Weave is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Weave.  If not, see <http://www.gnu.org/licenses/>.
+*/
+
+package weave.menus
+{
+	import flash.events.ContextMenuEvent;
+	import flash.ui.ContextMenu;
+	import flash.ui.ContextMenuItem;
+	import flash.utils.Dictionary;
+
+	/**
+	 * Uses WeaveMenuItem to define a ContextMenu.
+	 *
+	 * @see weave.menus.WeaveMenuItem
+	 */
+	public class WeaveContextMenu
+	{
+		/**
+		 * @params params Params to pass to WeaveMenuItem constructor.
+		 * @see weave.menus.WeaveMenuItem
+		 */
+		public static function createContextMenu(params:Object):ContextMenu
+		{
+			return new WeaveContextMenu(params as WeaveMenuItem || new WeaveMenuItem(params)).contextMenu;
+		}
+
+		private var _contextMenu:ContextMenu;
+		private var root:WeaveMenuItem;
+		private var cmi_to_wmi:Dictionary = new Dictionary(); // cmi -> wmi
+
+		public function WeaveContextMenu(root:WeaveMenuItem)
+		{
+			this.root = root;
+			_contextMenu = new ContextMenu();
+			_contextMenu.addEventListener(ContextMenuEvent.MENU_SELECT, handleMenuSelect);
+			_contextMenu.hideBuiltInItems();
+		}
+
+		/**
+		 * The ContextMenu generated by this object.
+		 */
+		public function get contextMenu():ContextMenu
+		{
+			return _contextMenu;
+		}
+
+		private function handleMenuSelect(e:*):void
+		{
+			var cmi_index:int = -1;
+			var cmi:ContextMenuItem;
+			for each (var wmi:WeaveMenuItem in root.children)
+			{
+				if (!cmi)
+					cmi = getCustomItem(++cmi_index);
+
+				if (wmi.type == WeaveMenuItem.TYPE_SEPARATOR)
+				{
+					cmi.separatorBefore = true;
+					continue;
+				}
+
+				cmi_to_wmi[cmi] = wmi;
+				cmi.caption = wmi.label;
+				cmi.visible = wmi.shown;
+				cmi.enabled = wmi.enabled;
+				cmi = null;
+			}
+
+			// hide remaining items
+			while (++cmi_index < _contextMenu.customItems.length)
+				(_contextMenu.customItems[cmi_index] as ContextMenuItem).visible = false;
+		}
+
+		private function getCustomItem(i:int):ContextMenuItem
+		{
+			while (!_contextMenu.customItems || _contextMenu.customItems.length <= i)
+			{
+				var items:Array = _contextMenu.customItems;
+				var cmi:ContextMenuItem = new ContextMenuItem('');
+				cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, handleMenuItemSelect);
+				items.push(cmi);
+				_contextMenu.customItems = items;
+			}
+			return _contextMenu.customItems[i];
+		}
+
+		private function handleMenuItemSelect(event:ContextMenuEvent):void
+		{
+			(cmi_to_wmi[event.target] as WeaveMenuItem).click();
+		}
+	}
+}


parallelizing Model and Layout loading process