Transferred from the Adobe Open Source Subversion Repository

Revision: 8
Author:   open-source-svn-admin@adobe.com
Date:     2007-12-15T01:49:31.087529Z

Log Message:
-----------
The beginning of the open-source Flex SDK.

Populated the flex/sdk/trunk directory with an open-source subset of files from //depot/flex/sdk/...@191097 in the Faramir Perforce server. This changelist is a bit past the 3.0rc0 build.

The Ant scripts will not successfully build yet. They need to be adapted to the open-source subset.

Modified Paths:
--------------
2532 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1268984 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/controls/menuClasses/MenuItemRenderer.as
+++ frameworks/projects/mx/src/mx/controls/menuClasses/MenuItemRenderer.as
@@ -0,0 +1,843 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2007 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.controls.menuClasses
+{
+
+import flash.display.DisplayObject;
+import flash.utils.getDefinitionByName;
+import mx.controls.Menu;
+import mx.controls.listClasses.BaseListData;
+import mx.controls.listClasses.IDropInListItemRenderer;
+import mx.controls.listClasses.IListItemRenderer;
+import mx.controls.listClasses.ListData;
+import mx.core.FlexVersion;
+import mx.core.IDataRenderer;
+import mx.core.IFlexDisplayObject;
+import mx.core.IFlexModuleFactory;
+import mx.core.IFontContextComponent;
+import mx.core.FlexVersion;
+import mx.core.IUITextField;
+import mx.core.UIComponent;
+import mx.core.UITextField;
+import mx.core.mx_internal;
+import mx.events.FlexEvent;
+
+use namespace mx_internal;
+
+//--------------------------------------
+//  Events
+//--------------------------------------
+
+/**
+ *  Dispatched when the data property changes.
+ *
+ *
When you use a component as an item renderer,
+ *  the data property contains the data to display.
+ *  You can listen for this event and update the component
+ *  when the data property changes.

+ *
+ *  @eventType mx.events.FlexEvent.DATA_CHANGE
+ */
+[Event(name="dataChange", type="mx.events.FlexEvent")]
+
+//--------------------------------------
+//  Styles
+//--------------------------------------
+
+/**
+ *  Text color of the menu item label.
+ *
+ *  @default 0x0B333C
+ */
+[Style(name="color", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  Color of the menu item if it is disabled.
+ *
+ *  @default 0xAAB3B3
+ */
+[Style(name="disabledColor", type="uint", format="Color", inherit="yes")]
+
+/**
+ *  The MenuItemRenderer class defines the default item renderer
+ *  for menu items in any menu control.
+ *
+ *  By default, the item renderer draws the text associated
+ *  with each menu item, the separator characters, and icons.
+ *
+ *
You can override the default item renderer
+ *  by creating a custom item renderer.

+ *
+ *  @see mx.controls.Menu
+ *  @see mx.controls.MenuBar
+ *  @see mx.core.IDataRenderer
+ *  @see mx.controls.listClasses.IDropInListItemRenderer
+ */
+public class MenuItemRenderer extends UIComponent
+							  implements IDataRenderer, IListItemRenderer,
+							  IMenuItemRenderer, IDropInListItemRenderer,
+							  IFontContextComponent
+{
+	include "../../core/Version.as";
+
+	//--------------------------------------------------------------------------
+	//
+	//  Constructor
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  Constructor.
+	 */
+	public function MenuItemRenderer()
+	{
+		super();
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden properties: UIComponent
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  baselinePosition
+    //----------------------------------
+
+    /**
+     *  @private
+     *  The baselinePosition of a MenuItemRenderer is calculated
+     *  for its label.
+     */
+    override public function get baselinePosition():Number
+    {
+		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+			super.baselinePosition;
+
+		if (!validateBaselinePosition())
+			return NaN;
+
+		return label.y + label.baselinePosition;
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+	//  branchIcon
+    //----------------------------------
+
+	/**
+	 *  The internal IFlexDisplayObject that displays the branch icon
+	 *  in this renderer.
+	 *
+	 *  @default null
+	 */
+	protected var branchIcon:IFlexDisplayObject;
+
+    //----------------------------------
+	//  data
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the data property.
+	 */
+	private var _data:Object;
+
+	[Bindable("dataChange")]
+
+	/**
+	 *  The implementation of the data property
+	 *  as defined by the IDataRenderer interface.
+	 *
+	 *  @see mx.core.IDataRenderer
+	 */
+	public function get data():Object
+	{
+		return _data;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set data(value:Object):void
+	{
+		_data = value;
+
+		invalidateProperties();
+		invalidateSize();
+
+		dispatchEvent(new FlexEvent(FlexEvent.DATA_CHANGE));
+	}
+
+    //----------------------------------
+    //  fontContext
+    //----------------------------------
+
+    /**
+     *  @private
+     */
+    public function get fontContext():IFlexModuleFactory
+    {
+        return moduleFactory;
+    }
+
+    /**
+     *  @private
+     */
+    public function set fontContext(moduleFactory:IFlexModuleFactory):void
+    {
+        this.moduleFactory = moduleFactory;
+    }
+
+    //----------------------------------
+	//  icon
+    //----------------------------------
+
+    // using getter/setter so we can have backwards-compatibility.  If someone
+    // subclassed and referred to icon, and they wanted to refer to the
+    // checkbox/radio button or a separator, it is now moved into typeIcon
+    // and separatorIcon
+
+	/**
+	 *  @private
+	 *  Storage for the icon property.
+	 */
+	private var _icon:IFlexDisplayObject;
+
+	/**
+	 *  The internal IFlexDisplayObject that displays the icon in this renderer.
+	 *
+	 *  @default null
+	 */
+	protected function get icon():IFlexDisplayObject
+	{
+		if (FlexVersion.compatibilityVersion < FlexVersion.VERSION_3_0)
+		{
+			if (_data)
+			{
+				var dataDescriptor:IMenuDataDescriptor =
+					Menu(_listData.owner).dataDescriptor;
+
+				var type:String = dataDescriptor.getType(_data);
+
+				// Separator
+				if (type.toLowerCase() == "separator")
+					return separatorIcon;
+			}
+
+			if (typeIcon)
+				return typeIcon;
+
+			return _icon;
+		}
+
+		return _icon;
+	}
+
+	/**
+	 *  @private
+	 */
+	protected function set icon(value:IFlexDisplayObject):void
+	{
+		_icon = value;
+	}
+
+    //----------------------------------
+	//  label
+    //----------------------------------
+
+	/**
+	 *  The internal UITextField that displays the text in this renderer.
+	 *
+	 *  @default null
+	 */
+	protected var label:IUITextField;
+
+    //----------------------------------
+	//  listData
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the listData property.
+	 */
+	private var _listData:ListData;
+
+	[Bindable("dataChange")]
+
+	/**
+	 *  The implementation of the listData property
+	 *  as defined by the IDropInListItemRenderer interface.
+	 *
+	 *  @see mx.controls.listClasses.IDropInListItemRenderer
+	 */
+	public function get listData():BaseListData
+	{
+		return _listData;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set listData(value:BaseListData):void
+	{
+		_listData = ListData(value);
+
+		invalidateProperties();
+	}
+
+    //----------------------------------
+	//  menu
+    //----------------------------------
+
+	/**
+	 *  @private
+	 *  Storage for the menu property.
+	 */
+	private var _menu:Menu;
+
+	/**
+	 *  Contains a reference to the associated Menu control.
+	 *
+	 *  @default null
+	 */
+	public function get menu():Menu
+	{
+		return _menu;
+	}
+
+	/**
+	 *  @private
+	 */
+	public function set menu(value:Menu):void
+	{
+		_menu = value;
+	}
+
+	//----------------------------------
+	//  separatorIcon
+    //----------------------------------
+
+	/**
+	 *  The internal IFlexDisplayObject that displays the separator icon in this renderer
+	 *
+	 *  @default null
+	 */
+	protected var separatorIcon:IFlexDisplayObject;
+
+	//----------------------------------
+	//  typeIcon
+    //----------------------------------
+
+	/**
+	 *  The internal IFlexDisplayObject that displays the type icon in this renderer for
+	 *  check and radio buttons.
+	 *
+	 *  @default null
+	 */
+	protected var typeIcon:IFlexDisplayObject;
+
+	//--------------------------------------------------------------------------
+	//
+	//  Overridden methods: UIComponent
+	//
+	//--------------------------------------------------------------------------
+
+	/**
+	 *  @private
+	 */
+	override protected function createChildren():void
+	{
+        super.createChildren();
+
+		createLabel(-1);
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function commitProperties():void
+	{
+		super.commitProperties();
+
+        // if the font changed and we already created the label, we will need to
+        // destory it so it can be re-created, possibly in a different swf context.
+        if (hasFontContextChanged() && label != null)
+        {
+        	var index:int = getChildIndex(DisplayObject(label));
+            removeLabel();
+ 			createLabel(index);
+        }
+
+		var iconClass:Class;
+		var typeIconClass:Class;
+		var separatorIconClass:Class;
+		var branchIconClass:Class;
+
+		// Remove any existing icon/type/separator/branch icons.
+		// These will be recreated below if needed.
+		if (_icon)
+		{
+			removeChild(DisplayObject(_icon));
+			_icon = null;
+		}
+		if (typeIcon)
+		{
+			removeChild(DisplayObject(typeIcon));
+			typeIcon = null;
+		}
+		if (separatorIcon)
+		{
+			removeChild(DisplayObject(separatorIcon));
+			separatorIcon = null;
+		}
+		if (branchIcon)
+		{
+			removeChild(DisplayObject(branchIcon));
+			branchIcon = null;
+		}
+
+		if (_data)
+		{
+			var dataDescriptor:IMenuDataDescriptor =
+				Menu(_listData.owner).dataDescriptor;
+
+			var isEnabled:Boolean = dataDescriptor.isEnabled(_data);
+			var type:String = dataDescriptor.getType(_data);
+
+			// Separator
+			if (type.toLowerCase() == "separator")
+			{
+				label.text = "";
+				label.visible = false;
+				separatorIconClass = getStyle("separatorSkin");
+				separatorIcon = new separatorIconClass();
+				addChild(DisplayObject(separatorIcon));
+				return;
+			}
+			else
+			{
+				label.visible = true;
+			}
+
+			// Icon
+			if (_listData.icon)
+			{
+				var listDataIcon:Object = _listData.icon;
+				if (listDataIcon is Class)
+				{
+					iconClass = Class(listDataIcon);
+				}
+				else if (listDataIcon is String)
+				{
+					iconClass =
+						Class(getDefinitionByName(String(listDataIcon)));
+				}
+
+				_icon = new iconClass();
+
+				addChild(DisplayObject(_icon));
+			}
+
+			// Label
+			label.text = _listData.label;
+
+			label.enabled = isEnabled;
+
+			// Check/radio icon
+			if (dataDescriptor.isToggled(_data))
+			{
+				var typeVal:String = dataDescriptor.getType(_data);
+				if (typeVal)
+				{
+					typeVal = typeVal.toLowerCase();
+					if (typeVal == "radio")
+					{
+						typeIconClass = getStyle(isEnabled ?
+											 "radioIcon" :
+											 "radioDisabledIcon");
+					}
+					else if (typeVal == "check")
+					{
+						typeIconClass = getStyle(isEnabled ?
+											 "checkIcon" :
+											 "checkDisabledIcon");
+					}
+
+					if (typeIconClass)
+					{
+						typeIcon = new typeIconClass();
+						addChild(DisplayObject(typeIcon));
+					}
+				}
+			}
+
+			// Branch icon
+			if (dataDescriptor.isBranch(_data))
+			{
+				branchIconClass = getStyle(isEnabled ?
+										   "branchIcon" :
+										   "branchDisabledIcon");
+
+				if (branchIconClass)
+				{
+					branchIcon = new branchIconClass();
+					addChild(DisplayObject(branchIcon));
+				}
+			}
+		}
+		else
+		{
+			label.text = " ";
+		}
+
+		// Invalidate layout here to ensure icons are positioned correctly.
+		invalidateDisplayList();
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function measure():void
+	{
+		super.measure();
+
+		if (separatorIcon)
+		{
+			measuredWidth = separatorIcon.measuredWidth;
+			measuredHeight = separatorIcon.measuredHeight;
+			return;
+		}
+
+		if (_listData)
+		{
+			// need to determine the left/right margin needed
+			// depends on whether there's an icon, a typeIcon, and/or a branchIcon
+			var iconWidth:Number = MenuListData(_listData).maxMeasuredIconWidth;
+			var typeIconWidth:Number = MenuListData(_listData).maxMeasuredTypeIconWidth;
+			var branchIconWidth:Number = MenuListData(_listData).maxMeasuredBranchIconWidth;
+			var useTwoColumns:Boolean = MenuListData(_listData).useTwoColumns;
+
+			var leftMargin:Number = Math.max(getStyle("leftIconGap"),
+										useTwoColumns ? iconWidth + typeIconWidth :
+														Math.max(iconWidth, typeIconWidth));
+			var rightMargin:Number = Math.max(getStyle("rightIconGap"), branchIconWidth);
+
+			if (isNaN(explicitWidth))
+			{
+				measuredWidth = label.measuredWidth + leftMargin + rightMargin + 7;
+			}
+			else
+			{
+				label.width = explicitWidth - leftMargin - rightMargin;
+			}
+
+			measuredHeight = label.measuredHeight;
+
+			// need to determine the height needed
+			if (_icon && _icon.measuredHeight > measuredHeight)
+				measuredHeight = _icon.measuredHeight;
+
+			if (typeIcon && typeIcon.measuredHeight > measuredHeight)
+				measuredHeight = typeIcon.measuredHeight;
+
+			if (branchIcon && branchIcon.measuredHeight > measuredHeight)
+				measuredHeight = branchIcon.measuredHeight;
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override protected function updateDisplayList(unscaledWidth:Number,
+												  unscaledHeight:Number):void
+	{
+		super.updateDisplayList(unscaledWidth, unscaledHeight);
+
+		if (_listData)
+		{
+			if (Menu(_listData.owner).dataDescriptor.
+				getType(_data).toLowerCase() == "separator")
+			{
+				if (separatorIcon)
+				{
+					separatorIcon.x = 2;
+					separatorIcon.y = (unscaledHeight - separatorIcon.measuredHeight) / 2;
+					separatorIcon.setActualSize(unscaledWidth - 4, separatorIcon.measuredHeight);
+				}
+				return;
+			}
+
+			var iconWidth:Number = MenuListData(_listData).maxMeasuredIconWidth;
+			var typeIconWidth:Number = MenuListData(_listData).maxMeasuredTypeIconWidth;
+			var branchIconWidth:Number = MenuListData(_listData).maxMeasuredBranchIconWidth;
+			var useTwoColumns:Boolean = MenuListData(_listData).useTwoColumns;
+
+			var leftMargin:Number = Math.max(getStyle("leftIconGap"),
+									useTwoColumns ? iconWidth + typeIconWidth :
+													Math.max(iconWidth, typeIconWidth));
+			var rightMargin:Number = Math.max(getStyle("rightIconGap"), branchIconWidth);
+
+			// check to see if laying out in two columns or not
+			if (useTwoColumns)
+			{
+				// if in two columns, center the two columns
+				// center the respective icons (if present) in their own column
+				var left:Number = (leftMargin - (iconWidth + typeIconWidth))/2
+
+				if (_icon)
+				{
+					_icon.x = left + (iconWidth - _icon.measuredWidth)/2;
+					_icon.setActualSize(_icon.measuredWidth, _icon.measuredHeight);
+				}
+
+				if (typeIcon)
+				{
+					typeIcon.x = left + iconWidth + (typeIconWidth - typeIcon.measuredWidth)/2;
+					typeIcon.setActualSize(typeIcon.measuredWidth, typeIcon.measuredHeight);
+				}
+			}
+			else
+			{
+				// if in one column mode, just center the one item in the left icon gap
+				if (_icon)
+				{
+					_icon.x = (leftMargin - _icon.measuredWidth)/2;
+					_icon.setActualSize(_icon.measuredWidth, _icon.measuredHeight);
+				}
+
+				if (typeIcon)
+				{
+					typeIcon.x = (leftMargin - typeIcon.measuredWidth)/2;
+					typeIcon.setActualSize(typeIcon.measuredWidth, typeIcon.measuredHeight);
+				}
+			}
+
+			if (branchIcon)
+			{
+				branchIcon.x = unscaledWidth - rightMargin +
+							   (rightMargin - branchIcon.measuredWidth)/2;
+				branchIcon.setActualSize(branchIcon.measuredWidth,
+										 branchIcon.measuredHeight);
+			}
+
+			label.x = leftMargin;
+			label.setActualSize(unscaledWidth - leftMargin - rightMargin,
+								label.getExplicitOrMeasuredHeight());
+
+			if (_listData && !Menu(_listData.owner).showDataTips)
+			{
+				label.text = _listData.label;
+				if (label.truncateToFit())
+					toolTip = _listData.label;
+				else
+					toolTip = null;
+			}
+
+			var verticalAlign:String = getStyle("verticalAlign");
+			if (verticalAlign == "top")
+			{
+				label.y = 0;
+				if (_icon)
+					_icon.y = 0;
+				if (typeIcon)
+					typeIcon.y = 0;
+				if (branchIcon)
+					branchIcon.y = 0;
+			}
+			else if (verticalAlign == "bottom")
+			{
+				label.y = unscaledHeight - label.height + 2; // 2 for gutter
+				if (_icon)
+					_icon.y = unscaledHeight - _icon.height;
+				if (typeIcon)
+					typeIcon.y = unscaledHeight - typeIcon.height;
+				if (branchIcon)
+					branchIcon.y = unscaledHeight - branchIcon.height;
+			}
+			else
+			{
+				label.y = (unscaledHeight - label.height) / 2;
+				if (_icon)
+					_icon.y = (unscaledHeight - _icon.height) / 2;
+				if (typeIcon)
+					typeIcon.y = (unscaledHeight - typeIcon.height) / 2;
+				if (branchIcon)
+					branchIcon.y = (unscaledHeight - branchIcon.height) / 2;
+			}
+
+			var labelColor:Number;
+
+			if (data && parent)
+			{
+				if (!enabled)
+				{
+					labelColor = getStyle("disabledColor");
+				}
+				else if (Menu(listData.owner).isItemHighlighted(listData.uid))
+				{
+					labelColor = getStyle("textRollOverColor");
+				}
+				else if (Menu(listData.owner).isItemSelected(listData.uid))
+				{
+					labelColor = getStyle("textSelectedColor");
+				}
+				else
+				{
+					labelColor = getStyle("color");
+				}
+
+				label.setColor(labelColor);
+			}
+		}
+	}
+
+	/**
+	 *  @private
+	 */
+	override public function styleChanged(styleProp:String):void
+	{
+		super.styleChanged(styleProp);
+
+		if (!styleProp ||
+			styleProp == "styleName" ||
+			(styleProp.toLowerCase().indexOf("icon") != -1))
+		{
+			// If any icons change, invalidate everything.
+			// We could be smarter about this if it causes
+			// performance problems.
+			invalidateSize();
+			invalidateDisplayList();
+		}
+	}
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Creates the title text field and adds it as a child of this component.
+     *
+     *  @param childIndex The index of where to add the child.
+	 *  If -1, the text field is appended to the end of the list.
+     */
+    mx_internal function createLabel(childIndex:int):void
+    {
+        if (!label)
+        {
+            label = IUITextField(createInFontContext(UITextField));
+
+			label.styleName = this;
+
+            if (childIndex == -1)
+                addChild(DisplayObject(label));
+            else
+                addChildAt(DisplayObject(label), childIndex);
+        }
+    }
+
+    /**
+     *  @private
+     *  Removes the title text field from this component.
+     */
+    mx_internal function removeLabel():void
+    {
+        if (label)
+        {
+            removeChild(DisplayObject(label));
+            label = null;
+        }
+    }
+
+    /**
+     *  @private
+     */
+    mx_internal function getLabel():IUITextField
+    {
+        return label;
+    }
+
+    /**
+     *  The width of the icon
+     */
+    public function get measuredIconWidth():Number
+    {
+    	var horizontalGap:Number = getStyle("horizontalGap");
+    	return _icon ? _icon.measuredWidth + horizontalGap : 0;
+    }
+
+    /**
+     *  The width of the type icon (radio/check)
+     */
+    public function get measuredTypeIconWidth():Number
+    {
+    	var horizontalGap:Number = getStyle("horizontalGap");
+
+    	if (typeIcon)
+    		return typeIcon.measuredWidth + horizontalGap;
+
+    	// even if there's no type icon, get what it's width would be...
+    	if (_data)
+    	{
+    		var typeIconClass:Class;
+    		var dataDescriptor:IMenuDataDescriptor =
+				Menu(_listData.owner).dataDescriptor;
+			var isEnabled:Boolean = dataDescriptor.isEnabled(_data);
+    		var typeVal:String = dataDescriptor.getType(_data);
+			if (typeVal)
+			{
+				typeVal = typeVal.toLowerCase();
+				if (typeVal == "radio")
+				{
+					typeIconClass = getStyle(isEnabled ?
+										 "radioIcon" :
+										 "radioDisabledIcon");
+				}
+				else if (typeVal == "check")
+				{
+					typeIconClass = getStyle(isEnabled ?
+										 "checkIcon" :
+										 "checkDisabledIcon");
+				}
+
+				if (typeIconClass)
+				{
+					typeIcon = new typeIconClass();
+					var typeIconWidth:Number = typeIcon.measuredWidth;
+					typeIcon = null;
+					return typeIconWidth + horizontalGap;
+				}
+			}
+    	}
+
+    	return 0;
+    }
+
+    /**
+     *  The width of the branch icon
+     */
+    public function get measuredBranchIconWidth():Number
+    {
+    	var horizontalGap:Number = getStyle("horizontalGap");
+        return branchIcon ? branchIcon.measuredWidth + horizontalGap : 0;
+    }
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 16752
Author:   dloverin@adobe.com
Date:     2010-06-30T20:16:39.449998Z

Log Message:
-----------
Fix problem compiling WindowedApplication for ASDoc.

QE notes: None.
Doc notes: None.
Bugs: SDK-26671
Reviewer: Gaurav
Tests run: checkintests
Is noteworthy for integration: No.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/core/WindowedApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airspark/src/spark/components/WindowedApplication.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1250609 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/airspark/src/spark/components/WindowedApplication.as
+++ frameworks/projects/airspark/src/spark/components/WindowedApplication.as
@@ -1861,7 +1861,7 @@
         const vsLoc:File = File.applicationDirectory.resolvePath(viewSourceURL);
         if (vsLoc.exists)
         {
-            const screenRect:Rectangle = Screen.mainScreen.visibleBounds;
+            const screenRect:Rectangle = flash.display.Screen.mainScreen.visibleBounds;
             const screenWidth:int = screenRect.width;
             const screenHeight:int = screenRect.height;


Transferred from the Adobe Open Source Subversion Repository

Revision: 3952
Author:   hmuller@adobe.com
Date:     2008-10-29T18:30:50.354671Z

Log Message:
-----------
Applied the clipContent changes from SVN 3935 to FxDataContainer.

QE Notes: layout and list mustella tests pass
Doc Notes: None
Bugs: sdk-17751
Reviewer: Ryan

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxDataContainer.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1280676 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
+++ frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as
@@ -78,7 +78,7 @@
     //  clipContent
     //----------------------------------

-    private var _clipContent:Boolean = true;
+    private var _clipContent:Boolean = false;

     /**
      *  @copy mx.core.IViewport#clipContent
@@ -95,6 +95,8 @@
     {
         _clipContent = value;

+        if (skin)  // TEMPORARY fix for SDK-17751
+            skin.clipContent = value;
         if (dataGroup)
             dataGroup.clipContent = value;
     }
@@ -237,6 +239,7 @@
             }
             if (_layout != null)
                 dataGroup.layout = _layout;
+            skin.clipContent = _clipContent;  // TEMPORARY fix for SDK-17751
             dataGroup.clipContent = _clipContent;
             if (_itemRenderer != null || _itemRendererFunction != null)
             {


Transferred from the Adobe Open Source Subversion Repository

Revision: 19451
Author:   cframpto@adobe.com
Date:     2010-12-17T14:49:14.734840Z

Log Message:
-----------
Implement body of getCellsAt() and fix scrollPositionChanged() so it invalidates the display if the scrollRect moves off of the currently covered rows/columns since the visible rows and/or column indices have to be updated.

QE notes:
Doc notes:
Bugs: SDK-28893, SDK-28904, SDK-28887
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281701 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -105,7 +105,7 @@
      */
     private const visibleItemRenderersBounds:Rectangle = new Rectangle();

-    /**
+	/**
      *  @private
      *  The viewport's bounding rectangle; often smaller then visibleItemRenderersBounds.
      *  Initialized by updateDisplayList with the current scrollPosition, and grid.width,Height.
@@ -393,14 +393,48 @@

         const hspChanged:Boolean = oldHorizontalScrollPosition != horizontalScrollPosition;
         const vspChanged:Boolean = oldVerticalScrollPosition != verticalScrollPosition;
-
+
         oldHorizontalScrollPosition = horizontalScrollPosition;
         oldVerticalScrollPosition = verticalScrollPosition;
-
-        // Only invalidate if we're clipping and scrollR extends outside visisibleRenderersBounds
-
-        const scrollR:Rectangle = grid.scrollRect;
-        if (scrollR && !visibleItemRenderersBounds.containsRect(scrollR))
+
+        // Only invalidate if we're clipping and rows and/or columns covered
+		// by the scrollR changes.  If so, the visible row/column indicies need
+		// to be updated.
+
+		var invalidate:Boolean;
+
+		if (visibleRowIndices.length == 0 || visibleColumnIndices.length == 0)
+			invalidate = true;
+
+		if (!invalidate && vspChanged)
+		{
+			const oldFirstRowIndex:int = visibleRowIndices[0];
+			const oldLastRowIndex:int = visibleRowIndices[visibleRowIndices.length - 1];
+
+			const newFirstRowIndex:int =
+				gridDimensions.getRowIndexAt(horizontalScrollPosition, verticalScrollPosition);
+			const newLastRowIndex:int =
+				gridDimensions.getRowIndexAt(horizontalScrollPosition, verticalScrollPosition + target.height);
+
+			if (oldFirstRowIndex != newFirstRowIndex || oldLastRowIndex != newLastRowIndex)
+				invalidate = true;
+		}
+
+		if (!invalidate && hspChanged)
+		{
+			const oldFirstColIndex:int = visibleColumnIndices[0];
+			const oldLastColIndex:int = visibleColumnIndices[visibleColumnIndices.length - 1];
+
+			const newFirstColIndex:int =
+				gridDimensions.getColumnIndexAt(horizontalScrollPosition, verticalScrollPosition);
+			const newLastColIndex:int =
+				gridDimensions.getColumnIndexAt(horizontalScrollPosition + target.width, verticalScrollPosition);
+
+			if (oldFirstColIndex != newFirstColIndex || oldLastColIndex != newLastColIndex)
+				invalidate = true;
+		}
+
+		if (invalidate)
         {
             var reason:String = "none";
             if (vspChanged && hspChanged)
@@ -1109,10 +1143,7 @@
         }
         else
         {
-            visibleItemRenderersBounds.x = 0;
-            visibleItemRenderersBounds.y = 0;
-            visibleItemRenderersBounds.width = 0;
-            visibleItemRenderersBounds.height = 0;
+            visibleItemRenderersBounds.setEmpty();
         }

         // Update visibleItemRenderers et al
@@ -2364,8 +2395,28 @@
      */
     public function getCellsAt(x:Number, y:Number, w:Number, h:Number):Vector.<CellPosition>
     {
-        // TODO(hmuller)
-        return new Vector.<Object>;
+        var cells:Vector.<CellPosition> = new Vector.<CellPosition>;
+
+		if (w <= 0 || h <= 0)
+			return cells;
+
+		// Get the row/column indexes of the corners of the region.
+		var topLeft:CellPosition = getCellAt(x, y);
+		var bottomRight:CellPosition = getCellAt(x + w, y + h);
+		if (!topLeft || !bottomRight)
+			return cells;
+
+		for (var rowIndex:int = topLeft.rowIndex;
+			 rowIndex <= bottomRight.rowIndex; rowIndex++)
+		{
+			for (var columnIndex:int = topLeft.columnIndex;
+				 columnIndex <= bottomRight.columnIndex; columnIndex++)
+			{
+				cells.push(new CellPosition(rowIndex, columnIndex));
+			}
+		}
+
+        return cells;
     }

     /**


Fixed refresh issue on multiple attributes input fields

--- collect-client/src/main/flex/org/openforis/collect/presenter/InputFieldPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/InputFieldPresenter.as
@@ -70,7 +70,7 @@
 			_view = inputField;
 			_contextMenu = new InputFieldContextMenu(_view);
 			super();
-			//updateView();
+			updateView();
 		}

 		override internal function initEventListeners():void {


Do not use rigth and left arrow to move focus to next/previous field

--- collect-client/src/main/flex/org/openforis/collect/presenter/InputFieldPresenter.as
+++ collect-client/src/main/flex/org/openforis/collect/presenter/InputFieldPresenter.as
@@ -407,14 +407,6 @@
 					horizontalMove = true;
 					offset = event.shiftKey ? -1: 1;
 					break;
-				case Keyboard.RIGHT:
-					horizontalMove = true;
-					offset = 1;
-					break;
-				case Keyboard.LEFT:
-					horizontalMove = true;
-					offset = -1;
-					break;
 				case Keyboard.DOWN:
 					horizontalMove = false;
 					offset = 1;


Added phong optimization

Added phong optimization

--- src/aerys/minko/render/material/phong/multipass/PhongEmissiveShader.as
+++ src/aerys/minko/render/material/phong/multipass/PhongEmissiveShader.as
@@ -1,7 +1,6 @@
 package aerys.minko.render.material.phong.multipass
 {
     import aerys.minko.render.RenderTarget;
-    import aerys.minko.render.material.Material;
     import aerys.minko.render.material.basic.BasicShader;
     import aerys.minko.render.resource.texture.ITextureResource;
     import aerys.minko.render.shader.SFloat;


public

public

--- src/com/kemsky/curry.as
+++ src/com/kemsky/curry.as
@@ -1,7 +1,6 @@
 package com.kemsky
 {
     /**
-     * @private
      * Creates partially applied function
      * @param func source
      * @param args arguments to apply to func


Fix for Bug #1232 bug in DrawCall.unsetBindings if _bindingsConsumer==null, the program is not created if enabled == false which is the expected behavior.

--- src/aerys/minko/render/DrawCall.as
+++ src/aerys/minko/render/DrawCall.as
@@ -172,8 +172,11 @@
 		public function unsetBindings(meshBindings	: DataBindings,
 									  sceneBindings	: DataBindings) : void
 		{
-			meshBindings.removeConsumer(_bindingsConsumer);
-			sceneBindings.removeConsumer(_bindingsConsumer);
+			if (_bindingsConsumer != null)
+			{
+				meshBindings.removeConsumer(_bindingsConsumer);
+				sceneBindings.removeConsumer(_bindingsConsumer);
+			}

 			if (sceneBindings.hasCallback('worldToScreen', transformChangedHandler))
 				sceneBindings.removeCallback('worldToScreen', transformChangedHandler);


Transferred from the Adobe Open Source Subversion Repository

Revision: 23247
Author:   cframpto@adobe.com
Date:     2011-12-20T19:21:13.134833Z

Log Message:
-----------
Remove ADOBE SYSTEMS license and replace with Apache license in headers - frameworks.  A 2nd pass will be needed to get the files not handled up by the scripts.

Modified Paths:
--------------
4959 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1277854 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as
+++ frameworks/projects/spark/src/mx/controls/dataGridClasses/MXDataGridItemRenderer.as
@@ -1,11 +1,19 @@
 ////////////////////////////////////////////////////////////////////////////////
 //
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2008 Adobe Systems Incorporated
-//  All Rights Reserved.
+//  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
 //
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
+//      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.
 //
 ////////////////////////////////////////////////////////////////////////////////


Transferred from the Adobe Open Source Subversion Repository

Revision: 19750
Author:   cframpto@adobe.com
Date:     2011-01-13T23:29:22.321521Z

Log Message:
-----------
Fix some ASdoc bugs in the grid item renderers.

QE notes:
Doc notes:
Bugs:
Reviewer: Hans
Tests run: cyclone
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UITextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1287368 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
+++ frameworks/projects/spark/src/spark/skins/spark/TextFieldGridItemRendererInclude.as
@@ -665,14 +665,24 @@
     //--------------------------------------------------------------------------

     /**
-     *  @private
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function prepare(willBeRecycled:Boolean):void
     {
     }

     /**
-     *  @private
+     *  @inheritDoc
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function discard(hasBeenRecycled:Boolean):void
     {
@@ -1060,7 +1070,14 @@
     //--------------------------------------------------------------------------

     /**
-     * @private
+     *  @inheritDoc
+     *
+     *  The renderer will inherit layoutDirection from its parent.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 2.5
+     *  @productversion Flex 4.5
      */
     public function get layoutDirection():String
     {
@@ -1068,10 +1085,7 @@
     }

     /**
-     * @private
-     * layoutDirection should not be set directly on this
-     * UIFTETextField.
-     * It will inherit layoutDirection from its parent.
+     * @private
      */
     public function set layoutDirection(value:String):void
     {


Added enterFrameSignal and exitFrameSignal to game loop.

--- src/engine/tetragon/core/GameLoop.as
+++ src/engine/tetragon/core/GameLoop.as
@@ -104,6 +104,10 @@
 		private var _renderSignal:RenderSignal;
 		/** @private */
 		private var _frameRateChangedSignal:Signal;
+		/** @private */
+		private var _enterFrameSignal:Signal;
+		/** @private */
+		private var _exitFrameSignal:Signal;

 		//-----------------------------------------------------------------------------------------
@@ -215,6 +219,20 @@
 		}

+		public function get enterFrameSignal():Signal
+		{
+			if (!_enterFrameSignal) _enterFrameSignal = new Signal();
+			return _enterFrameSignal;
+		}
+
+
+		public function get exitFrameSignal():Signal
+		{
+			if (!_exitFrameSignal) _exitFrameSignal = new Signal();
+			return _exitFrameSignal;
+		}
+
+
 		public function get frameRateChangedSignal():Signal
 		{
 			if (!_frameRateChangedSignal) _frameRateChangedSignal = new Signal();
@@ -231,6 +249,8 @@
 		 */
 		private function onEnterFrame(e:Event):void
 		{
+			if (_enterFrameSignal) _enterFrameSignal.dispatch();
+
 			var time:uint = getTimer();
 			var ms:uint = time - _total;
 			var ticks:uint = 0;
@@ -260,6 +280,8 @@
 			}

 			_renderSignal.dispatch(ticks, ms, _renderFPS);
+
+			if (_exitFrameSignal) _exitFrameSignal.dispatch();
 		}
 	}
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 12850
Author:   jimurphy@adobe.com
Date:     2009-12-11T14:57:14.623098Z

Log Message:
-----------
add 6 new DMV projects to the SDK:
automation
automation_air
automation_dmv
automation_flashflexkit
automation_spark
datavisualization

These projects are setup to build in an ant main call.  There are currently several warnings in the datavisualization project that will be cleaned up.  No checkintests exist for these projects as of yet.

I also modified the exisitng projects build files for easier management of the localization targets, bundle and fat-swc. If the projects that I updated:airframework,airspark,framework,playerglobal,rpc,and spark.  All the new projects have been implemented this same way.

QE notes: DMV folks should run through their tests
Doc notes: probably
Bugs: nope
Reviewer:
Tests run: ran the following targets: compile,checkintests,other.locales and doc
Is noteworthy for integration: no

Modified Paths:
--------------
1404 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1253335 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/charts/src/mx/charts/series/items/HLOCSeriesItem.as
+++ frameworks/projects/charts/src/mx/charts/series/items/HLOCSeriesItem.as
@@ -0,0 +1,414 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////
+
+package mx.charts.series.items
+{
+
+import mx.charts.ChartItem;
+import mx.charts.chartClasses.HLOCSeriesBase;
+import mx.graphics.IFill;
+
+/**
+ *  Represents the information required to render an item as part of a HLOCSeries.  The HLOCSeries class passes these items to its itemRenderer when rendering.
+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
+public class HLOCSeriesItem extends ChartItem
+{
+    include "../../../core/Version.as";
+
+    //--------------------------------------------------------------------------
+    //
+    //  Constructor
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Constructor.
+     *  @param  element The owning series.
+     *  @param  data    The item from the dataProvider that this ChartItem represents.
+     *  @param  index   The index of the item from the series's dataProvider.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public function HLOCSeriesItem(element:HLOCSeriesBase = null,
+                                   data:Object = null, index:uint = 0)
+    {
+        super(element, data, index);
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Properties
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  close
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The close value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var close:Number;
+
+    //----------------------------------
+    //  closeFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The close value of this item, filtered against the vertical axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var closeFilter:Number;
+
+    //----------------------------------
+    //  closeNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The close value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var closeNumber:Number;
+
+    //----------------------------------
+    //  closeValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The close value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var closeValue:Object;
+
+    //---------------------------------
+    //  fill
+    //---------------------------------
+    [Inspectable(environment="none")]
+
+    /**
+     * Holds fill color of the item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var fill:IFill;
+
+    //----------------------------------
+    //  high
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The high value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var high:Number;
+
+    //----------------------------------
+    //  highFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The high value of this item, filtered against the vertical axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var highFilter:Number;
+
+    //----------------------------------
+    //  highNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The high value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var highNumber:Number;
+
+    //----------------------------------
+    //  highValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The high value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var highValue:Object;
+
+    //----------------------------------
+    //  low
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The low value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var low:Number;
+
+    //----------------------------------
+    //  lowFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The low value of this item, filtered against the vertical axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var lowFilter:Number;
+
+    //----------------------------------
+    //  lowNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The low value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var lowNumber:Number;
+
+    //----------------------------------
+    //  lowValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The low value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var lowValue:Object;
+
+    //----------------------------------
+    //  open
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The open value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var open:Number;
+
+    //----------------------------------
+    //  openFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The open value of this item, filtered against the vertical axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var openFilter:Number;
+
+    //----------------------------------
+    //  openNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The open value of this item, converted to a number by the vertical axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var openNumber:Number;
+
+    //----------------------------------
+    //  openValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The open value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var openValue:Object;
+
+    //----------------------------------
+    //  x
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item converted into screen coordinates.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var x:Number;
+
+    //----------------------------------
+    //  xFilter
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, filtered against the horizontal axis of the containing chart. This value is NaN if the value lies outside the axis's range.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xFilter:Number;
+
+    //----------------------------------
+    //  xNumber
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item, converted to a number by the horizontal axis of the containing chart.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xNumber:Number;
+
+    //----------------------------------
+    //  xValue
+    //----------------------------------
+
+    [Inspectable(environment="none")]
+
+    /**
+     *  The x value of this item.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 9
+     *  @playerversion AIR 1.1
+     *  @productversion Flex 3
+     */
+    public var xValue:Object;
+
+    //--------------------------------------------------------------------------
+    //
+    //  Overridden methods
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  @private
+     *  Returns a copy of this ChartItem.
+     */
+    override public function clone():ChartItem
+    {
+        var result:HLOCSeriesItem = new HLOCSeriesItem(HLOCSeriesBase(element),item,index);
+        result.itemRenderer = itemRenderer;
+        return result;
+    }
+
+}
+
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1267838 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
+++ frameworks/projects/mx/src/mx/containers/utilityClasses/CanvasLayout.as
@@ -1,13 +1,3 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2005-2007 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////

 package mx.containers.utilityClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1260385 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/framework/src/mx/effects/effectClasses/AnimatePropertyInstance.as
+++ frameworks/projects/framework/src/mx/effects/effectClasses/AnimatePropertyInstance.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2005-2006 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

 package mx.effects.effectClasses
 {


Transferred from the Adobe Open Source Subversion Repository

Revision: 22904
Author:   chiedozi@adobe.com
Date:     2011-10-07T17:24:58.290926Z

Log Message:
-----------
TabbedViewNavigatorApplication now proxies IVisualElementContainer apis to its tabbedNavigator skinPart to allow support for states and deferredContent
When a ViewNavigatorApplication activates, it now sets the focus to the current view

QE notes:
Doc notes:
Bugs: SDK-30708,SDK-31783
Reviewer: Evtim
Tests run:
Is noteworthy for integration: No

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigatorApplication.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264369 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ViewNavigatorApplication.as
@@ -685,6 +685,9 @@
         {
             if (!navigator.activeView.isActive)
                 navigator.activeView.setActive(true);
+
+            // Set the stage focus to the navigator's active view
+            navigator.updateFocus();
         }
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23246
Author:   cframpto@adobe.com
Date:     2011-12-20T17:40:08.069454Z

Log Message:
-----------
Rollback 23243.  If comment followed header it was stripped as well.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1290704 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/advancedgrids/src/mx/styles/metadata/LeadingStyle.as
+++ frameworks/projects/advancedgrids/src/mx/styles/metadata/LeadingStyle.as
@@ -1,2 +1,23 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  ADOBE SYSTEMS INCORPORATED
+//  Copyright 2009 Adobe Systems Incorporated
+//  All Rights Reserved.
+//
+//  NOTICE: Adobe permits you to use, modify, and distribute this file
+//  in accordance with the terms of the license agreement accompanying it.
+//
+////////////////////////////////////////////////////////////////////////////////

+/**
+ *  Additional vertical space between lines of text.
+ *
+ *
The default value is 2.

+ *
The default value for the ComboBox control is 0.

+ *
+ *  @langversion 3.0
+ *  @playerversion Flash 9
+ *  @playerversion AIR 1.1
+ *  @productversion Flex 3
+ */
 [Style(name="leading", type="Number", format="Length", inherit="yes")]


Transferred from the Adobe Open Source Subversion Repository

Revision: 18287
Author:   hmuller@adobe.com
Date:     2010-10-22T16:00:45.871293Z

Log Message:
-----------
Fixed a performance problem introduced in SVN 18245: GridLayouter/layoutItemRenderers() now short-circuits rendererLayer.addElement(renderer) when the renderer's parent is already rendererLayer.

QE notes: Jody has excluded the 6 Mustella (bitmap compare) failures caused by this change
Doc notes:
Bugs:
Reviewer: Steve
Tests run: checkin, mustella cyclone
Is noteworthy for integration: no

Modified Paths:
--------------
/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1281676 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
+++ frameworks/projects/spark/src/spark/components/gridClasses/GridLayout.as
@@ -941,8 +941,8 @@
                     else
                         allocatedItemRenderers.push(renderer);
                 }
-
-                rendererLayer.addElement(renderer);
+                if (renderer.parent != rendererLayer)
+                    rendererLayer.addElement(renderer);
                 newVisibleItemRenderers.push(renderer);
                 initializeItemRenderer(renderer, rowIndex, colIndex);


Transferred from the Adobe Open Source Subversion Repository

Revision: 5931
Author:   chaase@adobe.com
Date:     2009-04-04T02:04:03.156232Z

Log Message:
-----------
Fixing error in my previous commit. Rename confusion - didn't putback changes for AnimateTransformInstance into correct/moved location. This should make AnimateTransform-based effects work a tad better.

QE Notes: spark/effects/AnimateTransform* tests failing due to unrelated skins and renaming issues - Matt investigating
Doc Notes: none
Bugs:
Reviewer: Glenn (on previous commit - this is just a fixup to that putback)
tests: checkintests

Modified Paths:
--------------
/flex/sdk/trunk/frameworks/projects/flex4/src/spark/effects/supportClasses/AnimateTransformInstance.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1284286 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
+++ frameworks/projects/spark/src/spark/effects/supportClasses/AnimateTransformInstance.as
@@ -52,6 +52,14 @@
     //--------------------------------------------------------------------------

     /**
+     *  @private
+     */
+    private static var TRANSFORM_PROPERTIES:Array =
+        ["translationX", "translationY", "translationZ",
+         "rotationX", "rotationY", "rotationZ",
+         "scaleX", "scaleY", "scaleZ"];
+
+    /**
      * Flag to indicate that this single instance of the transform-related
      * effects has already started and should not be started again. If there
      * are several transform effects running in the same effect tree, as children
@@ -82,10 +90,12 @@
     /**
      * Utility map used in applyValues()
      */
-    private var currentValues:Object = {rotationX:NaN, rotationY:NaN, rotation:NaN,
+    private var currentValues:Object = {rotationX:NaN, rotationY:NaN, rotationZ:NaN,
                                         scaleX:NaN, scaleY:NaN, scaleZ:NaN,
+                                        translationX:NaN, translationY:NaN, translationZ:NaN,
                                         _rotationX:NaN, _rotationY:NaN, _rotationZ:NaN,
-                                        _scaleX:NaN, _scaleY:NaN, _scaleZ:NaN };
+                                        _scaleX:NaN, _scaleY:NaN, _scaleZ:NaN,
+                                        _translationX:NaN, _translationY:NaN, _translationZ:NaN};

     /**
      * Utility structures used in applyValues()
@@ -263,12 +273,11 @@
     override public function play():void
     {
         var autoProps:Object = new Object();
-        var transformProps:Array = effect.getAffectedProperties();

         if (propertyChanges)
         {
             for (var s:String in propertyChanges.end)
-                if (transformProps.indexOf(s) >= 0)
+                if (TRANSFORM_PROPERTIES.indexOf(s) >= 0)
                     autoProps[s] = s;
         }
         if (animationProperties)
@@ -307,6 +316,18 @@
                 animationProperties = [];
             animationProperties.push(mp);
         }
+        if (propertyChanges && !disableConstraints)
+        {
+            setupConstraintAnimation("left");
+            setupConstraintAnimation("right");
+            setupConstraintAnimation("top");
+            setupConstraintAnimation("bottom");
+            setupConstraintAnimation("percentWidth");
+            setupConstraintAnimation("percentHeight");
+            setupConstraintAnimation("horizontalCenter");
+            setupConstraintAnimation("verticalCenter");
+            // TODO (chaase): also deal with baseline when it works in BasicLayout
+        }
         super.play();
     }

@@ -366,8 +387,12 @@
         // simultaneously to perform our composite transform operation
         for (var i:int = 0; i < animationProperties.length; ++i)
         {
-            var holder:MotionPath = MotionPath(animationProperties[i]);
-            currentValues[holder.property] = anim.currentValue[i];
+            // Collect all transform-related values in currentValues, but
+            // pass any other values, like constraints, to setValue()
+            if (currentValues[animationProperties[i].property] !== undefined)
+                currentValues[animationProperties[i].property] = anim.currentValue[i];
+            else
+                setValue(animationProperties[i].property, anim.currentValue[i]);
         }
         if (!isNaN(currentValues.scaleX) ||
             !isNaN(currentValues.scaleY) ||


Fixed color pool

Fixed color pool

--- src/hype/extended/color/ColorPool.as
+++ src/hype/extended/color/ColorPool.as
@@ -35,17 +35,15 @@
 		 * Add a color to the pool (prevents duplicates)
 		 *
 		 * @param color Color to add to the pool (uint)
-		 *
-		 * @return Whether the color was added
+		 * @param count Number of times to add this color
 		 */
-		public function addColor(color:uint):Boolean {
-			if (!hasColor(color)) {
+		public function addColor(color:uint, count:uint=1):void {
+			var i:uint;
+
+			_colorTable[color] = true;
+
+			for (i=0; i<count; ++i) {
 				_colorList.push(color);
-				_colorTable[color] = true;
-
-				return true;
-			} else {
-				return false;
 			}
 		}


序列化为文本格式时支持指定缩进

序列化为文本格式时支持指定缩进

--- as3/com/netease/protobuf/TextFormat.as
+++ as3/com/netease/protobuf/TextFormat.as
@@ -303,21 +303,28 @@
 		 * Outputs a textual representation of the Protocol Message supplied into
 		 * the parameter output.
 		 */
-		public static function printToUTFBytes(output:IDataOutput,
+		public static function printToUTFBytes(
+				output:IDataOutput,
 				message:Message,
-				singleLineMode:Boolean = true):void {
-			printMessageFields(output, message,
-				singleLineMode ? SINGLELINE_MODE : MULTILINE_MODE)
+				singleLineMode:Boolean = true,
+				currentIndent:String = ""):void {
+			printMessageFields(
+				output,
+				message,
+				singleLineMode ? SINGLELINE_MODE : MULTILINE_MODE,
+				currentIndent)
 		}

 		/**
 		 * Like printToUTFBytes(), but writes directly to a String and
 		 * returns it.
 		 */
-		public static function printToString(message:Message,
-				singleLineMode:Boolean = true):String {
+		public static function printToString(
+				message:Message,
+				singleLineMode:Boolean = true,
+				currentIndent:String = ""):String {
 			const ba:ByteArray = new ByteArray
-			printToUTFBytes(ba, message, singleLineMode)
+			printToUTFBytes(ba, message, singleLineMode, currentIndent)
 			ba.position = 0
 			return ba.readUTFBytes(ba.length)
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 21952
Author:   smgilson@adobe.com
Date:     2011-08-12T12:57:45.892892Z

Log Message:
-----------
ASDoc edits for ToggleSwitch

ASDoc bug fixes for: 2925508, 2912546, 2896762

QE notes:
Doc notes:
Bugs: 2925508, 2912546, 2896762
Reviewer:
Tests run: checkintests
Is noteworthy for integration:

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/framework/src/mx/core/ILayoutElement.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobiletheme/src/spark/skins/mobile/ToggleSwitchSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/utils/RpcClassAliasInitializer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264143 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as
+++ frameworks/projects/mobilecomponents/src/spark/components/ToggleSwitch.as
@@ -41,7 +41,7 @@
 //--------------------------------------

 /**
- *  Color applied to highlight the selected side of the ToggleSwitch
+ *  Color applied to highlight the selected side of the ToggleSwitch control.
  *
  *  @default 0x3F7FBA
  *
@@ -52,10 +52,13 @@
 [Style(name="accentColor", type="uint", format="Color", inherit="yes")]

 /**
- *  The duration in milleseconds for an animating the thumb between
- *  the selected and unselected sides of the track. Animating between
- *  two arbitrary positions on the track, for example after a drag
- *  gesture, will take a proportionally shorter amount of time.
+ *  The duration, in milleseconds, for an animation of the thumb
+ *  as it slides between the selected and unselected sides of the track.
+ *  For animations between any two arbitrary positions on the track,
+ *  the animation takes a proportionally shorter amount of time.
+ *  For example, after dragging the thumb half way along the track,
+ *  the animation for the slide the remainder of the way along the track
+ *  takes half the duration.
  *
  *  @default 125
  *
@@ -66,7 +69,7 @@
 [Style(name="slideDuration", type="Number", format="Time", inherit="no")]

 /**
- *  Alpha of text shadows.
+ *  The alpha of text shadows.
  *
  *  @default 0.65
  *
@@ -77,7 +80,7 @@
 [Style(name="textShadowAlpha", type="Number", inherit="yes", minValue="0.0", maxValue="1.0", theme="mobile")]

 /**
- *  Color of text shadows.
+ *  The color of text shadows.
  *
  *  @default 0x000000
  *
@@ -100,16 +103,66 @@
 [IconFile("ToggleSwitch.png")]

 /**
- *  The Spark ToggleSwitch component is a component that can flip between
- *  a selected and non selected state. The ToggleSwitch has a thumb
- *  skin part that moves between the two ends of the track skin part,
- *  similar to a Spark Slider.
+ *  The Spark ToggleSwitch control defines a binary switch that
+ *  can be in the selected or unselected state.
+ *  The ToggleSwitch consists of a thumb skin part that moves between
+ *  the two ends of the track skin part, similar to the Spark Slider control.
  *
- *  Clicking on the component will flip it from non-selected to selected,
- *  and vice-versa. A user can also drag the thumb along the track. When released,
- *  the thumb will move to the closest end of the track, and the ToggleSwitch
- *  will change to be either selected or non-selected, according to the thumb's
- *  position.
+ *
Clicking anywhere in the control toggles the state.
+ *  You can also slide the thumb along the track to change state.
+ *  When you release the thumb, the control changes state depending on
+ *  where you released the thumb.
+ *  If you release the thumb when you are over 50% of the way across the track,
+ *  the switch enters the selected state. Otherwise, it enters the unselected state.

+ *
+ *
The ToggleSwitch control uses the following default values for
+ *  the unselected and selected labels: OFF (unselected) and ON (selected).
+ *  Define a custom skin to change the labels, or to change other visual
+ *  characteristics of the control.

+ *
+ *
The following skin class, defined as a subclass of
+ *  spark.skins.mobile.ToggleSwitchSkin, changes the labels to Zero and One:

+ *
+ *

+ *  package skins
+ *  // components\mobile\skins\MyToggleSwitchSkin.as
+ *  {
+ *      import spark.skins.mobile.ToggleSwitchSkin;
+ *
+ *      public class MyToggleSwitchSkin extends ToggleSwitchSkin
+ *      {
+ *          public function MyToggleSwitchSkin()
+ *          {
+ *              super();
+ *              // Set properties to define the labels
+ *              // for the selected and unselected positions.
+ *              selectedLabel="One";
+ *              unselectedLabel="Zero";
+ *          }
+ *      }
+ *  }
+ *

+ *
+ *  @mxml
+ *
+ *
The <s:ToggleSwitch> tag inherits all of the tag
+ *  attributes of its superclass and adds the following tag attributes:

+ *
+ *

+ *  <s:ToggleSwitch
+ *   Properties
+ *    selected="null"
+ *    thumbPosition="null"
+ *
+ *   Common Styles
+ *    accentColor="0x3F7FBA"
+ *    slideDuration="125"
+ *
+ *   Mobile Styles
+ *    textShadowAlpha="0.65"
+ *    textShadowColor="0x000000"
+ *  >
+ *

  *
  *  @langversion 3.0
  *  @playerversion AIR 3
@@ -119,6 +172,7 @@
  *
  *  @see spark.components.ToggleButton
  *  @see spark.components.HSlider
+ *  @see spark.skins.mobile.ToggleSwitchSkin
  */
 public class ToggleSwitch extends ToggleButtonBase
 {
@@ -201,9 +255,9 @@
     [SkinPart(required="false")]

     /**
-     *  A skin part that can be dragged along the track. The thumb's
-     *  current position along the track is given by
-     *  thumbPosition.
+     *  A skin part that can be dragged along the track.
+     *  The thumbPosition property contains the thumb's
+     *  current position along the track.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -232,6 +286,15 @@
     //----------------------------------
     //  selected
     //----------------------------------
+    /**
+     *  The current state of the toggle switch.
+     *  A value of false corresponds to the unselected state,
+     *  and a value of 1 corresponds to the selected state.
+     *
+     *  @langversion 3.0
+     *  @playerversion AIR 3
+     *  @productversion Flex 4.5.2
+     */
     override public function set selected(value:Boolean):void
     {
         super.selected = value;
@@ -286,8 +349,9 @@
     [Bindable(event="thumbPositionChanged")]

     /**
-     *  The thumb's current position, ranging from 0, unselected,
-     *  to 1, selected.
+     *  The thumb's current position along the track.
+     *  The range of value is between 0.0, unselected,
+     *  and 1.0, selected.
      *
      *  @langversion 3.0
      *  @playerversion AIR 3
@@ -345,7 +409,7 @@
      */
     private function positionToSelected(value:Number):Boolean
     {
-        return value > 0.5;
+        return value > 0.5;
     }

     /**
@@ -353,7 +417,7 @@
      */
     private function selectedToPosition(value:Boolean):Number
     {
-        return value ? 1.0 : 0.0;
+        return value ? 1.0 : 0.0;
     }

     /**


Transferred from the Adobe Open Source Subversion Repository

Revision: 21170
Author:   chiedozi@adobe.com
Date:     2011-04-29T17:26:49.745588Z

Log Message:
-----------
Fixing a small typo in ASDocs for SplashScreen

Modified Paths:
--------------
/private/flex/sdk/branches/4.y/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264718 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
+++ frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
@@ -35,7 +35,7 @@
  *
  *  Developers can specify image class and resize mode through the Application properties
  *  splashScreenImage, splashScreenScaleMode and
- *  splashScreenMinimumDelayTime.
+ *  splashScreenMinimumDisplayTime.
  *
  *  The SplashScreen monitors device orientation and updates the image so that it
  *  appears on screen as if the orientation is always StageOrientation.DEFAULT.


Transferred from the Adobe Open Source Subversion Repository

Revision: 19344
Author:   egeorgie@adobe.com
Date:     2010-12-14T00:38:13.222484Z

Log Message:
-----------
PARB changes for density scaling

- authorDensity -> applicationDPI, type changed to int
- DensityUtil not visible in the documentation anymore [ExcludeClass]
- DensityUtil. screenDPIToDeviceDensity() -> classifyDPI(), returns int now
- DensityUtil. getDensityScale() -> getDPIScale(), takes int now
- DeviceDensity enum -> DPIClassification enum
- ISystemManager.densityScale property has been removed.
- New property to Application -> runtimeDPI.

QE notes: can start writing automated tests now
Doc notes:
Bugs:
Reviewer: Alex, Glenn, Jason SJ,
Tests run: checkintest
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/airframework/src/mx/managers/WindowedSystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/SystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/MobileSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/utils/DensityUtil.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextInputSkin.as</path>
<path kind="file" copyfrom-path="/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as" copyfrom-rev="19256" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DPIClassification.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationAngledButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/VScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/managers/ISystemManager.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ActionButtonSkin.as</path>
<path kind="file" action="D">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/DeviceDensity.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/ButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderDataTip.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/TextAreaSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderTrackSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/supportClasses/ActionBarButtonSkinBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/CheckBoxSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HSliderThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/RadioButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarThumbSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/HScrollBarSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobiletheme/src/spark/skins/mobile/NavigationButtonSkin.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Application.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1264714 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
+++ frameworks/projects/mobilecomponents/src/spark/preloaders/SplashScreen.as
@@ -358,9 +358,7 @@
         var orientation:String = stage.deviceOrientation;

         // DPI scaling factor of the stage
-        var dpiScale:Number = 1;
-        if (parent.parent is SystemManager)
-            dpiScale = SystemManager(parent.parent).densityScale;
+        var dpiScale:Number = this.root.scaleX;

         // Get stage dimensions at default orientation
         var stageWidth:Number;


Transferred from the Adobe Open Source Subversion Repository

Revision: 2570
Author:   gruehle@adobe.com
Date:     2008-07-22T23:10:37.258789Z

Log Message:
-----------
Bug fixes:
SDK-16112 - Graphic elements don't render correctly in List
SDK-16066 - List displays graphic objects on top of each other, and on top of Array object
SDK-16159 - RTE when graphic element is added to gumbo List if List content is ArrayCollection
SDK-16072 - RTE when getting gumbo List selectedItem if nothing is selected

Reviewer: Jason

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/component/Selector.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/flex/core/Group.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282321 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as
@@ -159,6 +159,9 @@
     [Bindable("selectionChanged")]
     public function get selectedItem():*
     {
+    	if (selectedIndex == NO_SELECTION)
+    	   return undefined;
+
         return getItemAt(selectedIndex);
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 4735
Author:   pfarland@adobe.com
Date:     2009-01-29T18:53:55.042174Z

Log Message:
-----------
Fixing id selectors for non-visual components. This required a special modification to the compiler to include id properties in generated code if a component was guaranteed to have an id property. A new mx.core.IID interface was introduced to opt in to the id property to be included. This change also required TextGraphicElement based components to implement IAdvancedStyleClient instead of just IStyleClient (though note that pseudo-selectors have no meaning for these components as they do not possess states).

QE: Yes
Doc: It's reasonably advanced, but we may want to document mx.core.IID for the case where a custom component exists that needs to be styled but is not based on UIComponent or GraphicElement.
Checkintests: Pass
Reviewers: Glenn, Paul R
Bugs:
SDK-18651 - Advanced CSS not setting styles on FXG elements correctly when styling using IDs

Modified Paths:
--------------
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/IID.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/builder/ComponentBuilder.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/TextGraphicElement.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/AttributeHandler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/styles/IAdvancedStyleClient.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/lang/StandardDefs.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/FrameworkClasses.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/mxml/InterfaceCompiler.java</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/GraphicElement.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1282991 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TextBase.as
@@ -18,7 +18,7 @@

 import mx.core.mx_internal;
 import mx.styles.CSSStyleDeclaration;
-import mx.styles.IStyleClient;
+import mx.styles.IAdvancedStyleClient;
 import mx.styles.StyleManager;
 import mx.styles.StyleProtoChain;
 import mx.utils.NameUtil;
@@ -28,7 +28,7 @@
  *  which display text using CSS styles for the default format.
  */
 public class TextGraphicElement extends GraphicElement
-    implements IStyleClient
+    implements IAdvancedStyleClient
 {
     include "../../core/Version.as";

@@ -250,6 +250,38 @@

     //--------------------------------------------------------------------------
     //
+    //  Properties: IAdvancedStyleClient
+    //
+    //--------------------------------------------------------------------------
+
+    //----------------------------------
+    //  pseudoSelectorState
+    //----------------------------------
+
+    /**
+     *  This property is required by the IAdvancedStyleClient interface,
+     *  but returns null for TextGraphicElements as they do not have
+     *  state specific behavior.
+     */
+    public function get pseudoSelectorState():String
+    {
+        return null;
+    }
+
+    //----------------------------------
+    //  styleParent
+    //----------------------------------
+
+    /**
+     *  The parent of this component.
+     */
+    public function get styleParent():IAdvancedStyleClient
+    {
+        return parent as IAdvancedStyleClient;
+    }
+
+    //--------------------------------------------------------------------------
+    //
     //  Properties
     //
     //--------------------------------------------------------------------------
@@ -400,6 +432,30 @@
      *  but doesn't do anything for TextGraphicElements.
      */
     public function registerEffects(effects:Array /* of String */):void
+    {
+    }
+
+    //--------------------------------------------------------------------------
+    //
+    //  Methods: IAdvancedStyleClient
+    //
+    //--------------------------------------------------------------------------
+
+    /**
+     *  Determines whether this instance is the same as - or is a subclass of -
+     *  the given type.
+     */
+    public function isAssignableToType(type:String):Boolean
+    {
+        return StyleProtoChain.isAssignableToType(this, type);
+    }
+
+    /**
+     *  This method is required by the IAdvancedStyleClient interface,
+     *  but doesn't do anything for TextGraphicElements as they do not have
+     *  state specific behavior.
+     */
+    public function applyStateStyles(oldState:String, newState:String, recursive:Boolean):void
     {
     }


- change: Application now properly initializes reprise debugging, using the Application class's name as the connection name

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

--- src/reprise/core/Application.as
+++ src/reprise/core/Application.as
@@ -24,6 +24,7 @@
 	import flash.display.StageScaleMode;
 	import flash.events.Event;
 	import flash.external.ExternalInterface;
+	import flash.utils.getQualifiedClassName;

 	public class Application extends Sprite
 	{
@@ -127,6 +128,11 @@

 		protected function initialize() : void
 		{
+			CONFIG::debug
+			{
+				var className : String = getQualifiedClassName(this).split('::').pop();
+				zz_init(stage, className);
+			}
 			m_appContext = new ApplicationContext(this, this.loaderInfo);
 			ApplicationRegistry.instance().registerApplication(this);
 			stage.align = StageAlign.TOP_LEFT;


git-svn-id: svn+ssh://kelev.kaltura.com/usr/local/kalsource/backend/server/trunk/core@53728 6b8eccd3-e8c5-4e7d-8186-e12b5326b719

--- generator/sources/as3/utils/ObjectUtil.as
+++ generator/sources/as3/utils/ObjectUtil.as
@@ -2,8 +2,16 @@
 {
 	import flash.utils.describeType;

+	/**
+	 * ObjectUtil class holds different utilities for use with objects
+	 */
 	public class ObjectUtil
 	{
+		/**
+		 * retreives a list of all keys on the given object
+		 * @param obj	the object to operate on
+		 * @return an array with all keys as strings
+		 */
 		public static function getObjectAllKeys( obj : Object ) : Array
 		{
 			var arr : Array = new Array();
@@ -12,26 +20,41 @@
 			return arr;
 		}

+		/**
+		 * retreives a list of all the keys defined at authoring time.
+		 * @param obj	the object to operate on
+		 * @return an array with all keys as strings
+		 */
 		public static function getObjectStaticKeys( obj : Object ) : Array
 		{
 			var arr : Array = new Array();
 			var classInfo:XML = describeType(obj);
-
+
 			for each (var v:XML in classInfo..accessor)
-				arr.push( v.@name.toString() );
-
+			arr.push( v.@name.toString() );
+
 			return arr;
 		}

+		/**
+		 * retreives a list of all the keys defined at runtime (for dynamic objects).
+		 * @param obj	the object to operate on
+		 * @return an array with all keys as strings
+		 */
 		public static function getObjectDynamicKeys( obj : Object ) : Array
 		{
 			var arr : Array = new Array();
 			for( var str:String in obj )
 				arr.push( str );
-
+
 			return arr;
 		}

+		/**
+		 * retreives a list of all the values on the given object.
+		 * @param obj	the object to operate on
+		 * @return an array with all values
+		 */
 		public static function getObjectAllValues( obj : Object ) : Array
 		{
 			var arr : Array = new Array();
@@ -40,23 +63,101 @@
 			return arr;
 		}

+		/**
+		 * retreives a list of all the values of keys defined at authoring time.
+		 * @param obj	the object to operate on
+		 * @return an array with all values
+		 */
 		public static function getObjectStaticValues( obj : Object ) : Array
 		{
 			var arr : Array = new Array();
 			var classInfo:XML = describeType(obj);
 			for each (var v:XML in classInfo..variable)
-				arr.push( obj[v.@name] );
+			arr.push( obj[v.@name] );

 			return arr;
 		}

+		/**
+		 * retreives a list of all the values of keys defined at runtime (for dynamic objects).
+		 * @param obj	the object to operate on
+		 * @return an array with all values
+		 */
 		public static function getObjectDynamicValues( obj : Object ) : Array
 		{
 			var arr : Array = new Array();
 			for( var str:String in obj )
 				arr.push( obj[str] );
-
+
 			return arr;
 		}
+
+
+		/**
+		 * compare variables and properties of 2 given objects
+		 * this function deliberately ignors the property uid.
+		 * @param object1
+		 * @param object2
+		 * @return
+		 *
+		 */
+		public static function compareObjects(object1:Object,object2:Object):Boolean
+		{
+			var ob1:Object = describeObject(object1);
+			var ob2:Object = describeObject(object2);
+			//run on obj1, check if the value exist in ob2 and check its value
+			for (var o:Object in ob1)
+			{
+				if (ob2.hasOwnProperty(o))
+				{
+					if(ob1[o] != ob2[o] && o!="uid")
+						return false;
+
+				} else
+				{
+					return false;
+				}
+			}
+			//run on obj2, check if the value exist in ob1 and check its value
+			for (var p:Object in ob2)
+			{
+				if (ob1.hasOwnProperty(p))
+				{
+					if(ob2[p] != ob1[p] && p!="uid")
+						return false;
+
+				} else
+				{
+					return false;
+				}
+			}
+
+			return true;
+		}
+
+		/**
+		 * Return an object that holds all variables and properties and their values
+		 * @param obj
+		 * @return
+		 *
+		 */
+		public static function describeObject(obj:Object):Object
+		{
+			var ob:Object = new Object();
+
+			var classInfo:XML = describeType(obj);
+			//map all variables
+			for each (var v:XML in classInfo..variable)
+			{
+				ob[v.@name] = obj[v.@name];
+			}
+			//map all properties
+			for each (var a:XML in classInfo..accessor)
+			{
+				ob[a.@name] = obj[a.@name];
+			}
+			return ob;
+		}
+
 	}
 }


added default values to ColumnStatistics results to compensate for lack of runtime type coercion


vast: fix skip statistics

vast: fix skip statistics

--- plugins/vastPlugin/src/com/kaltura/kdpfl/plugin/component/VastMediator.as
+++ plugins/vastPlugin/src/com/kaltura/kdpfl/plugin/component/VastMediator.as
@@ -140,6 +140,7 @@
 					break;
 				case "vastStartedPlaying":
 					isListening = true;
+					_adStarted = true;
 					break;
 				case NotificationType.SEQUENCE_ITEM_PLAY_END:
 					if (isListening ) {


Update Configuration.as

Update Configuration.as

--- com/segonquart/Configuration.as
+++ com/segonquart/Configuration.as
@@ -1,5 +1,6 @@
-import mx.events.EventDispatcher;
+import mx.events.EventDispatcher;
 import mx.utils.Delegate;
+
 class com.segonquart.Configuration extends MovieClip
 {
 	public var addListener:Function;
@@ -17,7 +18,7 @@
 		this.m = m;
 		m.config ();
 	}
-	static function config ():Void
+	static function config ()
 	{
 		System.security.allowDomain (URLAPP);
 		System.security.loadPolicyFile (POLICY);


Add a level timer to the main procedure

Add a level timer to the main procedure

--- bin/Data/Scripts/Main.as
+++ bin/Data/Scripts/Main.as
@@ -1,6 +1,7 @@
 Scene@ newScene_;
 Scene@ scene_;
 Camera@ camera_;
+Timer timer_;

 void Start()
 {
@@ -15,6 +16,9 @@
 void HandleLevelComplete(StringHash type, VariantMap& data)
 {
 	log.Debug("Level Complete. I should be loading "+data["NextLevel"].GetString());
+	float timeTaken = timer_.GetMSec(false);
+	log.Debug("You took " + timeTaken / 1000.f + " seconds to solve the level");
+
 	StartScene(data["NextLevel"].GetString());
 }

@@ -48,4 +52,6 @@
 	scene_ = newScene_;
 	camera_ = newCamera;
 	newScene_ = null;
+
+	timer_.Reset();
 }


Fixed SASL failure. XIFF-33 XIFF-34. Reviewer=David

--- src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
+++ src/org/jivesoftware/xiff/core/XMPPBOSHConnection.as
@@ -182,6 +182,10 @@
 					break;

 				case "success":
+					handleAuthentication( currentNode );
+					break;
+
+				case "failure":
 					handleAuthentication( currentNode );
 					break;
 				default:
@@ -387,7 +391,7 @@
 	                bindConnection();
 	            }
 	            else {
-	                dispatchEvent(new ErrorEvent(ErrorEvent.ERROR));
+					dispatchError("Authentication Error", "", "", 401);
 	                disconnect();
 	            }
 	        }


remove one more commented out reference to AVMPLUS_MOPS (r=me)

--- shell/Domain.as
+++ shell/Domain.as
@@ -58,7 +58,7 @@
 	{
 		return loadBytes(ByteArray.readFile(filename))
 	}
-//#ifdef AVMPLUS_MOPS
+
 	/**
 	 * Gets the minimum length of a ByteArray required to be used as
 	 * ApplicationDomain.globalMemory
@@ -79,7 +79,6 @@
 	 */
 	public native function get domainMemory():ByteArray;
 	public native function set domainMemory(mem:ByteArray);
-//#endif AVMPLUS_MOPS
 }

 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 3890
Author:   rfrishbe@adobe.com
Date:     2008-10-24T22:24:17.938205Z

Log Message:
-----------
Various renames for FxComponent, mostly based on PARB recommendations.  Most were just simple name changes or removal of methods.  Because commitSkinState() no longer exists, Button had to be modified pretty extensively so that it didn't key off of that method.

QE Notes: Joann's updated the tests and excluded them pending this checkin
Doc Notes: None
Bugs: SDK-17116
Reviewer: Hans, Evtim

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextInput.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxScroller.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxContainerBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxTrackBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/baseClasses/FxComponent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxTextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxToggleButton.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/mx/components/FxSpinner.as</path>

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1283110 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/TrackBase.as
@@ -250,7 +250,7 @@
     /**
      *  @inheritDoc
      */
-    override protected function getUpdatedSkinState():String
+    override protected function getCurrentSkinState():String
     {
         return enabled ? "normal" : "disabled";
     }


Transferred from the Adobe Open Source Subversion Repository

Revision: 23243
Author:   cframpto@adobe.com
Date:     2011-12-20T00:59:57.384047Z

Log Message:
-----------
In frameworks, remove Adobe headers from all files except xml/mxml file types.  There are also a few .txt files that are license files that I didn't touch yet.

Modified Paths:
--------------
2361 paths were modified

git-svn-id: 7146a936b37d36e51ea0d66f8acbe0b8281bc7b7@1286480 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
+++ frameworks/projects/spark/src/spark/skins/spark/DefaultGridItemRenderer.as
@@ -1,18 +1,4 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-//  ADOBE SYSTEMS INCORPORATED
-//  Copyright 2010 Adobe Systems Incorporated
-//  All Rights Reserved.
-//
-//  NOTICE: Adobe permits you to use, modify, and distribute this file
-//  in accordance with the terms of the license agreement accompanying it.
-//
-////////////////////////////////////////////////////////////////////////////////
-
-// Warning: the implementation of this class is identical to UITextFieldGridItemRenderer.
-// Although most of the common code has been factored into the "IUITextFieldGridItemRenderer.as"
-// include file, the imports metadata and other code below have been copied.  All changes
-// to this file should be mirrored by TextFieldGridItemRendererInclude.as.
+

 package spark.skins.spark
 {


fix set text bug

fix set text bug

--- src/flash/text/TextField.as
+++ src/flash/text/TextField.as
@@ -339,6 +339,7 @@
 			}
 			hasATag = false;
 			chars = null;
+			lines = null;
 			appendText(value);
 		}


cleanup imports

cleanup imports

--- WeaveData/src/weave/services/beans/EntityTableInfo.as
+++ WeaveData/src/weave/services/beans/EntityTableInfo.as
@@ -19,8 +19,6 @@

 package weave.services.beans
 {
-	import mx.utils.ObjectUtil;
-
 	public class EntityTableInfo
 	{
 		public var id:int;


Now using getLabel() in ExternalTool.

Now using getLabel() in ExternalTool.

--- WeaveUI/src/weave/visualization/tools/ExternalTool.as
+++ WeaveUI/src/weave/visualization/tools/ExternalTool.as
@@ -21,6 +21,7 @@
 	import mx.utils.Base64Encoder;
 	import mx.utils.UIDUtil;

+	import weave.api.core.ILinkableObject;
 	import weave.api.data.IAttributeColumn;
 	import weave.api.reportError;
 	import weave.api.ui.IObjectWithSelectableAttributes;
@@ -115,7 +116,12 @@
 		 */
 		public function getSelectableAttributeNames():Array
 		{
-			return getNames(IAttributeColumn);
+			return getObjects(IAttributeColumn).map(getLabel);
+		}
+
+		private function getLabel(obj:ILinkableObject, i:int, a:Array):String
+		{
+			return WeaveAPI.EditorManager.getLabel(obj);
 		}

 		/**


:memo:

:memo:

--- index.as
+++ index.as
@@ -2,8 +2,8 @@
 // [ ] Methods / Member Functions :: `implement T`
 // [ ] Error: Use before declare (applies mainly to `let r = r * 2` cases)
 // [ ] Structure return from function (direct via compressed integers or sret)
-// [ ] `c_void` -> Alias to `()`
 // [ ] Unit should be an empty llvm struct instead of <nothing>
+// [ ] (from `#include`) `c_void` -> Alias to `()`
 // [ ] Type alias of a type alias should refer to the canoncial type
 // [ ] Generic structures :: `struct Box<T> { }`
 // [x] `import ".."` cache


Change 20090112-hqm-j by hqm@badtzmaru.home on 2009-01-12 13:25:36 EST
    in /Users/hqm/openlaszlo/trunk5
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Allow snippets to load into app, when wrapper html file comes from different URL

New Features:

Bugs Fixed: LPP-7615

Technical Reviewer: ptw
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:

+ When a snippet is compiled, the URL to load it from at runtime is
baked in as a relative path, like "build/myapp/mylib.lzx.swf".

The SWF9 library loader was creating a new URLRequest using that
relative URL, and when loaded, it would load relative to the current
HTML wrapper's URL, which could be in some place random.

The fix is to construct the library load URL by grabbing
lz.Browser.getBaseURL(), which, in swf9 anyway, seems URL that the app
swf code loaded from rather than the location of the HTML wrapper
page.

This change constructs the the snippet's load URL by appending
lz.Browser.getBaseURL() to the snippet's baked-in relative path.

+ The test case from the bug report may not work in SWF8 and DHTML
either, I haven't tested those runtimes yet. This is just a fix for
swf9.

Tests:

+ test case from bug report
+ regular tests in test/snippets in swf9

git-svn-id: d62bde4b5aa582fdf07c8d403e53e0399a7ed285@12429 fa20e4f9-1d0a-0410-b5f3-dc9c16b8b17c

--- WEB-INF/lps/lfc/kernel/swf9/LzLibrary.as
+++ WEB-INF/lps/lfc/kernel/swf9/LzLibrary.as
@@ -1,7 +1,7 @@
 /**
   * LzLibrary.as
   *
-  * @copyright Copyright 2001-2008 Laszlo Systems, Inc.  All Rights Reserved.
+  * @copyright Copyright 2001-2009 Laszlo Systems, Inc.  All Rights Reserved.
   *            Use is subject to license terms.
   *
   * @topic LZX
@@ -156,12 +156,13 @@
         return;
     }
     this.loading = true;
-    var request:URLRequest = new URLRequest(this.href);
+    var loadurl:LzURL = lz.Browser.getBaseURL();
+    loadurl.file = this.href;
+    var request:URLRequest = new URLRequest(loadurl.toString());
     request.method = URLRequestMethod.GET;
     this.loader = new Loader();
     var info:LoaderInfo = loader.contentLoaderInfo;
     info.addEventListener(Event.COMPLETE, handleLoadComplete);
-    trace('loader.load ', this.href);
     this.loader.load(request);
 }


Fixed bug in Compiler.stringify handling undefined values in Arrays.

Change-Id: I6dc8b9978875d85aeef100d74415061192eab1fe

--- WeaveCore/src/weave/compiler/Compiler.as
+++ WeaveCore/src/weave/compiler/Compiler.as
@@ -1174,8 +1174,8 @@
 			output = [];
 			if (value is Array)
 			{
-				for (key in value)
-					output.push(_stringify(key, value[key], replacer, lineBreakIndent, indent, json_values_only));
+				for (var i:int = 0; i < (value as Array).length; i++)
+					output.push(_stringify(String(i), value[i], replacer, lineBreakIndent, indent, json_values_only));
 			}
 			else if (value.constructor == Object)
 			{