Added cycle count (in units of dots for the PPU) to all official instructions.

--- src/net/johnmercer/nes/system/CPU.as
+++ src/net/johnmercer/nes/system/CPU.as
@@ -65,6 +65,7 @@
 		];

 		private var _instructions:Vector.<Function> = new <Function>[
+		//////// 00  /  08     01  /  09     02  /  0A     03  /  0B     04  /  0C     05  /  0D     06  /  0E     07  /  0F
 		/*0x00*/ instrBRK_IMP, instrORA_INX, instrXXX_XXX, instrSLO_INX, instrNOP_ZPG, instrORA_ZPG, instrASL_ZPG, instrSLO_ZPG,
 		         instrPHP_IMP, instrORA_IMM, instrASL_ACM, instrANC_IMM, instrNOP_ABS, instrORA_ABS, instrASL_ABS, instrSLO_ABS,
 		/*0x10*/ instrBPL_REL, instrORA_INY, instrXXX_XXX, instrSLO_INY, instrNOP_ZPX, instrORA_ZPX, instrASL_ZPX, instrSLO_ZPX,
@@ -182,7 +183,7 @@

 		// Emulation values
 		private var _cycleCount:uint = 0;
-		private var _scanLine:uint = 0;
+		private var _scanLine:int = 0;

 		public function CPU(emulator:Emulator, rom:ROM, mapper:Mapper)
@@ -221,6 +222,7 @@
 		{
 			PC = address;
 			_cycleCount = 0;
+			_scanLine = 241;
 			SP = 0xFD;
 			A = X = Y = 0;
 			P = 0x24;
@@ -276,13 +278,13 @@
 			param2 = int.MAX_VALUE;
 			paramWord = int.MAX_VALUE;

-			//_currentState.address = PC;
+			_currentState.address = PC;

 			instruction = readUnsignedByte(PC++);
 			addressingMode = INST_ADDR_MODE[instruction];

-			//_currentState.opcode = instruction;
-			/*  Used by automated testing
+			_currentState.opcode = instruction;
+			//  Used by automated testing
 			switch(addressingMode)
 			{
 				// Two bytes for an unsigned word
@@ -330,12 +332,28 @@
 			_currentState.Y = Y;
 			_currentState.P = P;
 			_currentState.SP = SP;
+			_currentState.CYC = _cycleCount;
+			_currentState.SL = _scanLine;

 			_debugStr += paramsToStr(param1, param2, paramWord, instruction, addressingMode);
 			_debugStr += stateToStr();
-			*/
+
+
 			// execute instruction
-			_instructions[instruction]();
+			_instructions[instruction]();
+
+
+			// Calculate scanline
+			if (_cycleCount >= 341)
+			{
+				_scanLine++;
+				_cycleCount -= 341;
+			}
+			if (_scanLine > 260)
+			{
+				_scanLine -= 262;
+			}
+
 		}

 		// Memory access
@@ -487,6 +505,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrADC(value);
+			_cycleCount += 6;
 		}

 		private function instrADC_ZPG():void
@@ -496,6 +515,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrADC(value);
+			_cycleCount += 9;
 		}

 		private function instrADC_ZPX():void
@@ -505,6 +525,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			value = _mem.readUnsignedByte();
 			instrADC(value);
+			_cycleCount += 12;
 		}

 		private function instrADC_ABS():void
@@ -514,6 +535,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrADC(value);
+			_cycleCount += 12;
 		}

 		private function instrADC_ABX():void
@@ -523,6 +545,13 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrADC(value);
+
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) != ((paramWord + X) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 12;
+
 		}

 		private function instrADC_ABY():void
@@ -532,6 +561,12 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrADC(value);
+
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) != ((paramWord + Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 12;
 		}

 		private function instrADC_INX():void
@@ -550,22 +585,30 @@

 			value = readUnsignedByte(value);
 			instrADC(value);
+			_cycleCount += 18;
 		}

 		private function instrADC_INY():void
 		{
 			param1 = readUnsignedByte(PC++);
+			var addr:uint = 0;
 			var value:uint = 0;
 			if (param1 == 0xFF)
-				value = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
+				addr = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
 			else
 			{
 				_mem.position = param1;
-				value = _mem.readUnsignedShort();
-			}
-			value = (value + Y) & 0xFFFF;
+				addr = _mem.readUnsignedShort();
+			}
+			value = (addr + Y) & 0xFFFF;
 			value = readUnsignedByte(value);
 			instrADC(value);
+
+			// Check for page boundary cross
+			if ((addr & 0xFF00) != ((addr + Y) & 0xFF00))
+				_cycleCount += 18;
+			else
+				_cycleCount += 15;
 		}

 		private function instrADC(value:uint):void
@@ -600,6 +643,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrAND(value);
+			_cycleCount += 6;
 		}

 		private function instrAND_ZPG():void
@@ -609,6 +653,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrAND(value);
+			_cycleCount += 9;
 		}

 		private function instrAND_ZPX():void
@@ -618,6 +663,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			value = _mem.readUnsignedByte();
 			instrAND(value);
+			_cycleCount += 12;
 		}

 		private function instrAND_ABS():void
@@ -627,6 +673,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrAND(value);
+			_cycleCount += 12;
 		}

 		private function instrAND_ABX():void
@@ -636,6 +683,12 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrAND(value);
+
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) != ((paramWord + X) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 12;
 		}

 		private function instrAND_ABY():void
@@ -645,6 +698,12 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrAND(value);
+
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) != ((paramWord + Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 12;
 		}

 		private function instrAND_INX():void
@@ -663,23 +722,31 @@

 			value = readUnsignedByte(value);
 			instrAND(value);
+			_cycleCount += 18;
 		}

 		private function instrAND_INY():void
 		{
 			param1 = readUnsignedByte(PC++);
 			var value:uint = 0;
+			var addr:uint = 0;
 			if (param1 == 0xFF)
-				value = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
+				addr = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
 			else
 			{
 				_mem.position = param1;
-				value = _mem.readUnsignedShort();
-			}
-
-			value = (value + Y) & 0xFFFF;
+				addr = _mem.readUnsignedShort();
+			}
+
+			value = (addr + Y) & 0xFFFF;
 			value = readUnsignedByte(value);
 			instrAND(value);
+
+			// Check for page boundary cross
+			if ((addr & 0xFF00) != ((addr + Y) & 0xFF00))
+				_cycleCount += 18;
+			else
+				_cycleCount += 15;
 		}

 		private function instrAND(value:uint):void
@@ -701,6 +768,7 @@
 			value = A << 1;
 			A = value & 0xFF;
 			instrASL(value);
+			_cycleCount += 6;
 		}

 		private function instrASL_ZPG():void
@@ -712,6 +780,7 @@
 			_mem.position = param1;
 			_mem.writeByte(value & 0xFF);
 			instrASL(value);
+			_cycleCount += 15;
 		}

 		private function instrASL_ZPX():void
@@ -723,6 +792,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(value & 0xFF);
 			instrASL(value);
+			_cycleCount += 18;
 		}

 		private function instrASL_ABS():void
@@ -733,6 +803,7 @@
 			value = readUnsignedByte(paramWord) << 1;
 			writeByte(paramWord, value & 0xFF);
 			instrASL(value);
+			_cycleCount += 18;
 		}

 		private function instrASL_ABX():void
@@ -743,6 +814,7 @@
 			value = readUnsignedByte((paramWord + X) & 0xFFFF) << 1;
 			writeByte((paramWord + X) & 0xFFFF, value & 0xFF);
 			instrASL(value);
+			_cycleCount += 21;
 		}

@@ -767,9 +839,14 @@
 		{
 			param1 = readUnsignedByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if ((P & CARRY_FLAG) == 0)
 			{
-				PC = (PC + rel) & 0xFFFF;
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
+				PC = (PC + rel) & 0xFFFF;
 			}
 		}

@@ -777,8 +854,13 @@
 		{
 			param1 = readUnsignedByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if (P & CARRY_FLAG)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC  = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -787,8 +869,13 @@
 		{
 			param1 = readUnsignedByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if (P & ZERO_FLAG)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -800,6 +887,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrBIT(value);
+			_cycleCount += 9;
 		}
 		private function instrBIT_ABS():void
 		{
@@ -808,6 +896,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrBIT(value);
+			_cycleCount += 12;
 		}

 		private function instrBIT(value:uint):void
@@ -829,8 +918,13 @@
 		{
 			param1 = readByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if (P &  NEGATIVE_FLAG)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -839,8 +933,13 @@
 		{
 			param1 = readByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if ((P & ZERO_FLAG) == 0)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -849,8 +948,13 @@
 		{
 			param1 = readByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if ((P & NEGATIVE_FLAG) == 0)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -863,15 +967,20 @@
 			PC = readUnsignedWord(0xFFFE);

 			P |= BREAK_FLAG;
+			_cycleCount += 21;
 		}

 		private function instrBVC_REL():void
 		{
 			param1 = readByte(PC++);
 			var rel:int = param1;
-
+			_cycleCount += 6;
 			if ((P & OVERFLOW_FLAG) == 0)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -880,8 +989,13 @@
 		{
 			param1 = readByte(PC++);
 			var rel:int = param1;
+			_cycleCount += 6;
 			if (P & OVERFLOW_FLAG)
 			{
+				if ((PC & 0xFF00) == ((PC + rel) & 0xFF00))
+					_cycleCount += 3;
+				else
+					_cycleCount += 6;
 				PC = (PC + rel) & 0xFFFF;
 			}
 		}
@@ -889,21 +1003,25 @@
 		private function instrCLC_IMP():void
 		{
 			P &=  ~CARRY_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrCLD_IMP():void
 		{
 			P &= ~DECIMAL_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrCLI_IMP():void
 		{
 			P &= ~IRQ_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrCLV_IMP():void
 		{
 			P &= ~OVERFLOW_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrCMP_IMM():void
@@ -911,7 +1029,8 @@
 			param1 = readUnsignedByte(PC++);
 			var value:uint = 0;
 			value = param1 & 0xFF;
-			instrCMP(value);
+			instrCMP(value);
+			_cycleCount += 6;
 		}

 		private function instrCMP_ZPG():void
@@ -921,6 +1040,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrCMP(value);
+			_cycleCount += 9;
 		}

 		private function instrCMP_ZPX():void
@@ -930,6 +1050,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			value = _mem.readUnsignedByte();
 			instrCMP(value);
+			_cycleCount += 12;
 		}

 		private function instrCMP_ABS():void
@@ -939,6 +1060,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrCMP(value);
+			_cycleCount += 12;
 		}

 		private function instrCMP_ABX():void
@@ -948,6 +1070,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrCMP(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrCMP_ABY():void
@@ -957,6 +1084,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrCMP(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + Y) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrCMP_INX():void
@@ -975,23 +1107,30 @@

 			value = readUnsignedByte(value);
 			instrCMP(value);
+			_cycleCount += 18;
 		}

 		private function instrCMP_INY():void
 		{
 			param1 = readUnsignedByte(PC++);
 			var value:uint = 0;
+			var addr:uint = 0;
 			if (param1 == 0xFF)
-				value = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
+				addr = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
 			else
 			{
 				_mem.position = param1;
-				value = _mem.readUnsignedShort();
-			}
-
-			value = (value + Y) & 0xFFFF;
+				addr = _mem.readUnsignedShort();
+			}
+
+			value = (addr + Y) & 0xFFFF;
 			value = readUnsignedByte(value);
 			instrCMP(value);
+			// Check for page boundary cross
+			if ((addr & 0xFF00) == ((addr + Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 18;
 		}

 		private function instrCMP(value:uint):void
@@ -1014,6 +1153,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrCPX(value);
+			_cycleCount += 6;
 		}

 		private function instrCPX_ZPG():void
@@ -1023,6 +1163,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrCPX(value);
+			_cycleCount += 9;
 		}

 		private function instrCPX_ABS():void
@@ -1032,6 +1173,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrCPX(value);
+			_cycleCount += 12;
 		}

 		private function instrCPX(value:uint):void
@@ -1054,6 +1196,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrCPY(value);
+			_cycleCount += 6;
 		}

 		private function instrCPY_ZPG():void
@@ -1063,6 +1206,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrCPY(value);
+			_cycleCount += 9;
 		}

 		private function instrCPY_ABS():void
@@ -1072,6 +1216,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrCPY(value);
+			_cycleCount += 12;
 		}

 		private function instrCPY(value:uint):void
@@ -1097,6 +1242,7 @@
 			_mem.position = param1;
 			_mem.writeByte(value);
 			instrDEC(value);
+			_cycleCount += 15;
 		}

 		private function instrDEC_ZPX():void
@@ -1108,6 +1254,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(value);
 			instrDEC(value);
+			_cycleCount += 18;
 		}

 		private function instrDEC_ABS():void
@@ -1118,6 +1265,7 @@
 			value = (readUnsignedByte(paramWord) - 1) & 0xFF;
 			writeByte(paramWord, value);
 			instrDEC(value);
+			_cycleCount += 18;
 		}

 		private function instrDEC_ABX():void
@@ -1128,6 +1276,7 @@
 			value = (readUnsignedByte((paramWord + X) & 0xFFFF) - 1) & 0xFF;
 			writeByte((paramWord + X) & 0xFFFF, value);
 			instrDEC(value);
+			_cycleCount += 21;
 		}

 		private function instrDEC(value:uint):void
@@ -1152,6 +1301,8 @@

 			if (X & 0x80)
 				P |= NEGATIVE_FLAG;
+
+			_cycleCount += 6;
 		}

 		private function instrDEY_IMP():void
@@ -1165,6 +1316,8 @@

 			if (Y & 0x80)
 				P |= NEGATIVE_FLAG;
+
+			_cycleCount += 6;
 		}

 		private function instrEOR_IMM():void
@@ -1173,6 +1326,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrEOR(value);
+			_cycleCount += 6;
 		}

 		private function instrEOR_ZPG():void
@@ -1182,6 +1336,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrEOR(value);
+			_cycleCount += 9;
 		}

 		private function instrEOR_ZPX():void
@@ -1191,6 +1346,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			value = _mem.readUnsignedByte();
 			instrEOR(value);
+			_cycleCount += 12;
 		}

 		private function instrEOR_ABS():void
@@ -1200,6 +1356,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrEOR(value);
+			_cycleCount += 12;
 		}

 		private function instrEOR_ABX():void
@@ -1209,6 +1366,12 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrEOR(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
+
 		}

 		private function instrEOR_ABY():void
@@ -1218,6 +1381,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrEOR(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + Y) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrEOR_INX():void
@@ -1236,23 +1404,30 @@

 			value = readUnsignedByte(value);
 			instrEOR(value);
+			_cycleCount += 18;
 		}

 		private function instrEOR_INY():void
 		{
 			param1 = readUnsignedByte(PC++);
-			var value:uint = 0;
+			var addr:uint = 0;
+			var value:uint = 0;
 			if (param1 == 0xFF)
-				value = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
+				addr = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
 			else
 			{
 				_mem.position = param1;
-				value = _mem.readUnsignedShort();
-			}
-
-			value = (value + Y) & 0xFFFF;
+				addr = _mem.readUnsignedShort();
+			}
+
+			value = (addr + Y) & 0xFFFF;
 			value = readUnsignedByte(value);
 			instrEOR(value);
+			// Check for page boundary cross
+			if ((addr & 0xFF00) == ((addr + Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 18;
 		}

@@ -1275,6 +1450,7 @@
 			_mem.position = param1;
 			_mem.writeByte(value);
 			instrINC(value);
+			_cycleCount += 15;
 		}

 		private function instrINC_ZPX():void
@@ -1286,6 +1462,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(value);
 			instrINC(value);
+			_cycleCount += 18;
 		}

 		private function instrINC_ABS():void
@@ -1296,6 +1473,7 @@
 			value = (readUnsignedByte(paramWord) + 1) & 0xFF;
 			writeByte(paramWord, value);
 			instrINC(value);
+			_cycleCount += 18;
 		}

 		private function instrINC_ABX():void
@@ -1306,6 +1484,7 @@
 			value = (readUnsignedByte((paramWord + X) & 0xFFFF) + 1) & 0xFF;
 			writeByte((paramWord + X) & 0xFFFF, value);
 			instrINC(value);
+			_cycleCount += 21;
 		}

 		private function instrINC(value:uint):void
@@ -1331,6 +1510,8 @@

 			if (X & 0x80)
 				P |= NEGATIVE_FLAG;
+
+			_cycleCount += 6;
 		}

 		private function instrINY_IMP():void
@@ -1344,6 +1525,8 @@

 			if (Y & 0x80)
 				P |= NEGATIVE_FLAG;
+
+			_cycleCount += 6;
 		}

 		private function instrJMP_ABS():void
@@ -1351,6 +1534,7 @@
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
 			PC = paramWord;
+			_cycleCount += 9;
 		}

 		private function instrJMP_IND():void
@@ -1367,7 +1551,7 @@
 			{
 				PC = readUnsignedWord(paramWord);
 			}
-
+			_cycleCount += 15;
 		}

 		private function instrJSR_ABS():void
@@ -1377,6 +1561,7 @@
 			pushStack((PC & 0xFF00) >> 8);
 			pushStack(PC & 0xFF);
 			PC = paramWord;
+			_cycleCount += 18;
 		}

 		private function instrLDA_IMM():void
@@ -1384,6 +1569,7 @@
 			param1 = readUnsignedByte(PC++);
 			A = param1 & 0xFF;
 			instrLDA();
+			_cycleCount += 6;
 		}

 		private function instrLDA_ZPG():void
@@ -1392,6 +1578,7 @@
 			_mem.position = param1;
 			A = _mem.readUnsignedByte();
 			instrLDA();
+			_cycleCount += 9;
 		}

 		private function instrLDA_ZPX():void
@@ -1400,6 +1587,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			A = _mem.readUnsignedByte();
 			instrLDA();
+			_cycleCount += 12;
 		}

 		private function instrLDA_ABS():void
@@ -1408,6 +1596,7 @@
 			PC += 2;
 			A = readUnsignedByte(paramWord);
 			instrLDA();
+			_cycleCount += 12;
 		}

 		private function instrLDA_ABX():void
@@ -1416,6 +1605,11 @@
 			PC += 2;
 			A = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrLDA();
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrLDA_ABY():void
@@ -1424,6 +1618,11 @@
 			PC += 2;
 			A = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrLDA();
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + Y) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrLDA_INX():void
@@ -1442,6 +1641,7 @@

 			A = readUnsignedByte(addr);
 			instrLDA();
+			_cycleCount += 18;
 		}

 		private function instrLDA_INY():void
@@ -1459,6 +1659,11 @@
 			addr = (addr + Y) & 0xFFFF;
 			A = readUnsignedByte(addr);
 			instrLDA();
+			// Check for page boundary cross
+			if ((addr & 0xFF00) == ((addr - Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 18;
 		}

 		private function instrLDA():void
@@ -1477,6 +1682,7 @@
 			param1 = readUnsignedByte(PC++);
 			X = param1 & 0xFF;
 			instrLDX();
+			_cycleCount += 6;
 		}

 		private function instrLDX_ZPG():void
@@ -1485,6 +1691,7 @@
 			_mem.position = param1;
 			X = _mem.readUnsignedByte();
 			instrLDX();
+			_cycleCount += 9;
 		}

 		private function instrLDX_ZPY():void
@@ -1493,6 +1700,7 @@
 			_mem.position = (param1 + Y) & 0xFF;
 			X = _mem.readUnsignedByte();
 			instrLDX();
+			_cycleCount += 12;
 		}

 		private function instrLDX_ABS():void
@@ -1501,6 +1709,7 @@
 			PC += 2;
 			X = readUnsignedByte(paramWord);
 			instrLDX();
+			_cycleCount += 12;
 		}

 		private function instrLDX_ABY():void
@@ -1509,6 +1718,11 @@
 			PC += 2;
 			X = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrLDX();
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + Y) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

@@ -1528,6 +1742,7 @@
 			param1 = readUnsignedByte(PC++);
 			Y = param1 & 0xFF;
 			instrLDY();
+			_cycleCount += 6;
 		}

 		private function instrLDY_ZPG():void
@@ -1536,6 +1751,7 @@
 			_mem.position = param1;
 			Y = _mem.readUnsignedByte();
 			instrLDY();
+			_cycleCount += 9;
 		}

 		private function instrLDY_ZPX():void
@@ -1544,6 +1760,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			Y = _mem.readUnsignedByte();
 			instrLDY();
+			_cycleCount += 12;
 		}

 		private function instrLDY_ABS():void
@@ -1552,6 +1769,7 @@
 			PC += 2;
 			Y = readUnsignedByte(paramWord);
 			instrLDY();
+			_cycleCount += 12;
 		}

 		private function instrLDY_ABX():void
@@ -1560,6 +1778,11 @@
 			PC += 2;
 			Y = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrLDY();
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrLDY():void
@@ -1581,6 +1804,7 @@
 			result = A >> 1;
 			A = result;
 			instrLSR(value, result);
+			_cycleCount += 6;
 		}

 		private function instrLSR_ZPG():void
@@ -1594,6 +1818,7 @@
 			_mem.position = param1;
 			_mem.writeByte(result);
 			instrLSR(value, result);
+			_cycleCount += 15;
 		}

 		private function instrLSR_ZPX():void
@@ -1607,6 +1832,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(result);
 			instrLSR(value, result);
+			_cycleCount += 18;
 		}

 		private function instrLSR_ABS():void
@@ -1619,6 +1845,7 @@
 			result = value >> 1;
 			writeByte(paramWord, result);
 			instrLSR(value, result);
+			_cycleCount += 18;
 		}

 		private function instrLSR_ABX():void
@@ -1631,6 +1858,7 @@
 			result = value >> 1;
 			writeByte((paramWord + X) & 0xFFFF, result);
 			instrLSR(value, result);
+			_cycleCount += 21;
 		}

 		private function instrLSR(value:uint, result:uint):void
@@ -1649,12 +1877,14 @@

 		private function instrNOP_IMP():void
 		{
+			_cycleCount += 6;
 			return;
 		}

 		private function instrNOP_ZPG():void
 		{
 			param1 = readUnsignedByte(PC++);
+			_cycleCount += 9;
 			return;
 		}

@@ -1662,18 +1892,21 @@
 		{
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
+			_cycleCount += 12;
 			return;
 		}

 		private function instrNOP_ZPX():void
 		{
 			param1 = readUnsignedByte(PC++);
+			_cycleCount += 12;
 			return;
 		}

 		private function instrNOP_IMM():void
 		{
 			param1 = readUnsignedByte(PC++);
+			_cycleCount += 6;
 			return;
 		}

@@ -1681,6 +1914,11 @@
 		{
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 			return;
 		}

@@ -1690,6 +1928,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrORA(value);
+			_cycleCount += 6;
 		}

 		private function instrORA_ZPG():void
@@ -1699,6 +1938,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrORA(value);
+			_cycleCount += 9;
 		}

 		private function instrORA_ZPX():void
@@ -1708,6 +1948,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			value = _mem.readUnsignedByte();
 			instrORA(value);
+			_cycleCount += 12;
 		}

 		private function instrORA_ABS():void
@@ -1717,6 +1958,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrORA(value);
+			_cycleCount += 12;
 		}

 		private function instrORA_ABX():void
@@ -1726,6 +1968,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrORA(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrORA_ABY():void
@@ -1735,6 +1982,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrORA(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + Y) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrORA_INX():void
@@ -1753,23 +2005,30 @@

 			value = readUnsignedByte(value);
 			instrORA(value);
+			_cycleCount += 18;
 		}

 		private function instrORA_INY():void
 		{
 			param1 = readUnsignedByte(PC++);
+			var addr:uint = 0;
 			var value:uint = 0;
 			if (param1 == 0xFF)
-				value = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
+				addr = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
 			else
 			{
 				_mem.position = param1;
-				value = _mem.readUnsignedShort();
-			}
-
-			value = (value + Y) & 0xFFFF;
+				addr = _mem.readUnsignedShort();
+			}
+
+			value = (addr + Y) & 0xFFFF;
 			value = readUnsignedByte(value);
 			instrORA(value);
+			// Check for page boundary cross
+			if ((addr & 0xFF00) == ((addr + Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 18;
 		}

 		private function instrORA(value:uint):void
@@ -1785,11 +2044,13 @@
 		private function instrPHA_IMP():void
 		{
 			pushStack(A);
+			_cycleCount += 9;
 		}

 		private function instrPHP_IMP():void
 		{
-			pushStack(P | BREAK_FLAG);  // Break flag is always pushed with a 1
+			pushStack(P | BREAK_FLAG);  // Break flag is always pushed with a 1
+			_cycleCount += 9;
 		}

 		private function instrPLA_IMP():void
@@ -1801,11 +2062,13 @@
 				P |= ZERO_FLAG;
 			if (A & 0x80)
 				P |= NEGATIVE_FLAG;
+			_cycleCount += 12;
 		}

 		private function instrPLP_IMP():void
 		{
 			P = (popStack() & ~BREAK_FLAG) | UNUSED_FLAG;
+			_cycleCount += 12;
 		}

 		private function instrROL_ACM():void
@@ -1815,6 +2078,7 @@
 			value = (A << 1) | (P & CARRY_FLAG);
 			A = value & 0xFF;
 			instrROL(value);
+			_cycleCount += 6;
 		}

 		private function instrROL_ZPG():void
@@ -1827,6 +2091,7 @@
 			_mem.position = param1;
 			_mem.writeByte(value & 0xFF);
 			instrROL(value);
+			_cycleCount += 15;
 		}

 		private function instrROL_ZPX():void
@@ -1839,6 +2104,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(value & 0xFF);
 			instrROL(value);
+			_cycleCount += 18;
 		}

 		private function instrROL_ABS():void
@@ -1850,6 +2116,7 @@
 			value = (value << 1) | (P & CARRY_FLAG);
 			writeByte(paramWord, value & 0xFF);
 			instrROL(value);
+			_cycleCount += 18;
 		}

 		private function instrROL_ABX():void
@@ -1861,6 +2128,7 @@
 			value = (value << 1) | (P & CARRY_FLAG);
 			writeByte((paramWord + X) & 0xFFFF, value & 0xFF);
 			instrROL(value);
+			_cycleCount += 21;
 		}

@@ -1887,6 +2155,7 @@
 			result = A >> 1 | ((P & CARRY_FLAG) << 7);
 			A = result;
 			instrROR(value, result);
+			_cycleCount += 6;
 		}

 		private function instrROR_ZPG():void
@@ -1900,6 +2169,7 @@
 			_mem.position = param1;
 			_mem.writeByte(result);
 			instrROR(value, result);
+			_cycleCount += 15;
 		}

 		private function instrROR_ZPX():void
@@ -1913,6 +2183,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(result);
 			instrROR(value, result);
+			_cycleCount += 18;
 		}

 		private function instrROR_ABS():void
@@ -1925,6 +2196,7 @@
 			result = value >> 1 | ((P & CARRY_FLAG) << 7);
 			writeByte(paramWord, result);
 			instrROR(value, result);
+			_cycleCount += 18;
 		}

 		private function instrROR_ABX():void
@@ -1937,6 +2209,7 @@
 			result = value >> 1 | ((P & CARRY_FLAG) << 7);
 			writeByte((paramWord + X) & 0xFFFF, result);
 			instrROR(value, result);
+			_cycleCount += 21;
 		}

 		private function instrROR(value:uint, result:uint):void
@@ -1957,6 +2230,7 @@
 			P = (popStack() & ~BREAK_FLAG) | UNUSED_FLAG;
 			PC = popStack();
 			PC |= popStack() << 8;
+			_cycleCount += 18;
 		}

 		private function instrRTS_IMP():void
@@ -1964,6 +2238,7 @@
 			PC = popStack();
 			PC |= (popStack() << 8);
 			PC++;
+			_cycleCount += 18;
 		}

 		private function instrSBC_IMM():void
@@ -1972,6 +2247,7 @@
 			var value:uint = 0;
 			value = param1 & 0xFF;
 			instrSBC(value);
+			_cycleCount += 6;
 		}

 		private function instrSBC_ZPG():void
@@ -1981,6 +2257,7 @@
 			_mem.position = param1;
 			value = _mem.readUnsignedByte();
 			instrSBC(value);
+			_cycleCount += 9;
 		}

 		private function instrSBC_ZPX():void
@@ -1990,6 +2267,7 @@
 			_mem.position = (param1 + X) & 0xFF;
 			value = _mem.readUnsignedByte();
 			instrSBC(value);
+			_cycleCount += 12;
 		}

 		private function instrSBC_ABS():void
@@ -1999,6 +2277,7 @@
 			var value:uint = 0;
 			value = readUnsignedByte(paramWord);
 			instrSBC(value);
+			_cycleCount += 12;
 		}

 		private function instrSBC_ABX():void
@@ -2008,6 +2287,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + X) & 0xFFFF);
 			instrSBC(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + X) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrSBC_ABY():void
@@ -2017,6 +2301,11 @@
 			var value:uint = 0;
 			value = readUnsignedByte((paramWord + Y) & 0xFFFF);
 			instrSBC(value);
+			// Check for page boundary cross
+			if ((paramWord & 0xFF00) == ((paramWord + Y) & 0xFF00))
+				_cycleCount += 12;
+			else
+				_cycleCount += 15;
 		}

 		private function instrSBC_INX():void
@@ -2035,23 +2324,30 @@

 			value = readUnsignedByte(value);
 			instrSBC(value);
+			_cycleCount += 18;
 		}

 		private function instrSBC_INY():void
 		{
 			param1 = readUnsignedByte(PC++);
+			var addr:uint = 0;
 			var value:uint = 0;
 			if (param1 == 0xFF)
-				value = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
+				addr = readUnsignedByte(0xFF) | (readUnsignedByte(0) << 8);
 			else
 			{
 				_mem.position = param1;
-				value = _mem.readUnsignedShort();
-			}
-
-			value = (value + Y) & 0xFFFF;
+				addr = _mem.readUnsignedShort();
+			}
+
+			value = (addr + Y) & 0xFFFF;
 			value = readUnsignedByte(value);
 			instrSBC(value);
+			// Check for page boundary cross
+			if ((addr & 0xFF00) == ((addr + Y) & 0xFF00))
+				_cycleCount += 15;
+			else
+				_cycleCount += 18;
 		}

@@ -2087,16 +2383,19 @@
 		private function instrSED_IMP():void
 		{
 			P |= DECIMAL_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrSEC_IMP():void
 		{
 			P |= CARRY_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrSEI_IMP():void
 		{
 			P |= IRQ_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrSTA_ZPG():void
@@ -2104,6 +2403,7 @@
 			param1 = readUnsignedByte(PC++);
 			_mem.position = param1;
 			_mem.writeByte(A);
+			_cycleCount += 9;
 		}

 		private function instrSTA_ZPX():void
@@ -2111,6 +2411,7 @@
 			param1 = readUnsignedByte(PC++);
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(A);
+			_cycleCount += 12;
 		}

 		private function instrSTA_ABS():void
@@ -2118,6 +2419,7 @@
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
 			writeByte(paramWord, A);
+			_cycleCount += 12;
 		}

 		private function instrSTA_ABX():void
@@ -2125,6 +2427,7 @@
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
 			writeByte((paramWord + X) & 0xFFFF, A);
+			_cycleCount += 15;
 		}

 		private function instrSTA_ABY():void
@@ -2132,6 +2435,7 @@
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
 			writeByte((paramWord + Y) & 0xFFFF, A);
+			_cycleCount += 15;
 		}

 		private function instrSTA_INX():void
@@ -2147,6 +2451,7 @@
 				addr = _mem.readUnsignedShort();
 			}
 			writeByte(addr, A);
+			_cycleCount += 18;
 		}

 		private function instrSTA_INY():void
@@ -2162,6 +2467,7 @@
 			}
 			addr = (addr + Y) & 0xFFFF;
 			writeByte(addr, A);
+			_cycleCount += 18;
 		}

 		private function instrSTX_ZPG():void
@@ -2169,6 +2475,7 @@
 			param1 = readUnsignedByte(PC++);
 			_mem.position = param1;
 			_mem.writeByte(X);
+			_cycleCount += 9;
 		}

 		private function instrSTX_ZPY():void
@@ -2176,6 +2483,7 @@
 			param1 = readUnsignedByte(PC++);
 			_mem.position = (param1 + Y) & 0xFF;
 			_mem.writeByte(X);
+			_cycleCount += 12;
 		}

 		private function instrSTX_ABS():void
@@ -2183,6 +2491,7 @@
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
 			writeByte(paramWord, X);
+			_cycleCount += 12;
 		}

 		private function instrSTY_ZPG():void
@@ -2190,6 +2499,7 @@
 			param1 = readUnsignedByte(PC++);
 			_mem.position = param1;
 			_mem.writeByte(Y);
+			_cycleCount += 9;
 		}

 		private function instrSTY_ZPX():void
@@ -2197,6 +2507,7 @@
 			param1 = readUnsignedByte(PC++);
 			_mem.position = (param1 + X) & 0xFF;
 			_mem.writeByte(Y);
+			_cycleCount += 12;
 		}

 		private function instrSTY_ABS():void
@@ -2204,6 +2515,7 @@
 			paramWord = readUnsignedWord(PC);
 			PC += 2;
 			writeByte(paramWord, Y);
+			_cycleCount += 12;
 		}

 		private function instrTAX_IMP():void
@@ -2217,6 +2529,7 @@

 			if (X & 0x80)
 				P |= NEGATIVE_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrTAY_IMP():void
@@ -2230,6 +2543,7 @@

 			if (Y & 0x80)
 				P |= NEGATIVE_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrTSX_IMP():void
@@ -2243,6 +2557,7 @@

 			if (X & 0x80)
 				P |= NEGATIVE_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrTXA_IMP():void
@@ -2256,11 +2571,13 @@

 			if (A & 0x80)
 				P |= NEGATIVE_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrTXS_IMP():void
 		{
 			SP = X;
+			_cycleCount += 6;
 		}

 		private function instrTYA_IMP():void
@@ -2274,6 +2591,7 @@

 			if (A & 0x80)
 				P |= NEGATIVE_FLAG;
+			_cycleCount += 6;
 		}

 		private function instrXXX_XXX():void


Transferred from the Adobe Open Source Subversion Repository

Revision: 17918
Author:   deeptika@adobe.com
Date:     2010-09-29T09:10:43.362516Z

Log Message:
-----------
Automation support for spark DG - 1
Only selection event is supported by automation. Header related events, column resize / sort, item edit and drag-drop are not yet supported by the component.

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

Modified Paths:
--------------
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/tabularData/SparkDataGridTabularData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/manifest_automation_spark.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/AutomationSparkClasses.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/events/SparkDataGridItemSelectEvent.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridItemRendererAutomationImpl.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridItemRendererAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridItemRendererAutomationImpl.as
@@ -0,0 +1,131 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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 spark.automation.delegates.skins.spark
+{
+	import flash.display.DisplayObject;
+
+	import mx.automation.Automation;
+	import mx.automation.delegates.core.UIComponentAutomationImpl;
+	import mx.automation.delegates.core.UIFTETextFieldAutomationImpl;
+	import mx.core.UIComponent;
+	import mx.core.mx_internal;
+
+	import spark.skins.spark.DefaultGridItemRenderer;
+
+	use namespace mx_internal;
+
+	[Mixin]
+	/**
+	 *
+	 *  Defines methods and properties required to perform instrumentation for the
+	 *  ItemRenderer class for spark.
+	 *
+	 *  @see spark.skins.spark.DefaultItemRenderer
+	 *
+	 *
+	 *  @langversion 3.0
+	 *  @playerversion Flash 10
+	 *  @playerversion AIR 1.1
+	 *  @productversion Flex 4
+	 */
+	public class SparkDefaultGridItemRendererAutomationImpl extends UIFTETextFieldAutomationImpl
+	{
+		include "../../../../core/Version.as";
+
+		//--------------------------------------------------------------------------
+		//
+		//  Class methods
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Registers the delegate class for a component class with automation manager.
+		 *
+		 *  @param root The SystemManger of the application.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 9
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 3
+		 */
+		public static function init(root:DisplayObject):void
+		{
+			Automation.registerDelegateClass(spark.skins.spark.DefaultGridItemRenderer, SparkDefaultGridItemRendererAutomationImpl);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Constructor
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  Constructor.
+		 * @param obj DefaultGridItemRenderer object to be automated.
+		 *
+		 *  @langversion 3.0
+		 *  @playerversion Flash 10
+		 *  @playerversion AIR 1.1
+		 *  @productversion Flex 4
+		 */
+		public function SparkDefaultGridItemRendererAutomationImpl(obj:DefaultGridItemRenderer)
+		{
+			super(obj);
+		}
+
+		//--------------------------------------------------------------------------
+		//
+		//  Variables
+		//
+		//--------------------------------------------------------------------------
+
+		/**
+		 *  @private
+		 *  storage for the owner component
+		 */
+		protected function get gridItem():spark.skins.spark.DefaultGridItemRenderer
+		{
+			return uiFTETextField as spark.skins.spark.DefaultGridItemRenderer;
+		}
+
+
+		//--------------------------------------------------------------------------
+		//
+		//  Overridden properties
+		//
+		//--------------------------------------------------------------------------
+
+		//----------------------------------
+		//  automationName
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationName():String
+		{
+			return gridItem.label|| super.automationName;
+		}
+
+		//----------------------------------
+		//  automationValue
+		//----------------------------------
+
+		/**
+		 *  @private
+		 */
+		override public function get automationValue():Array
+		{
+			return [automationName];
+		}
+
+	}
+}


Transferred from the Adobe Open Source Subversion Repository

Revision: 19060
Author:   harishs@adobe.com
Date:     2010-12-06T17:34:15.020965Z

Log Message:
-----------
QE notes: Did checkintests, performed full cyclone run. There were 19 failures in mustella report. QE Judy (Mingzhou Gao and Joann Chung Anderson) confirmed that they are known problems.
Doc notes: As part of Sort and Sortfield updates, the asdoc comments were updated to reflect globalization changes.
Bugs: Fixed sdk-28493, 28691,28494, 28345, 28320, 28387, 28314, 28145
Reviewer: Gordon Smith
Tests run: cyclone, checkintests, bugs testfiles
Is noteworthy for integration: Sort and Sortfield updated with globalization support using the new spark globalization sort classes.
Number and CurrencyValidators support national digits and unicode minus symbols.
groupingPattern property dropped for Number and Currency Validators.

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests-config.xml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/SortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/DataGrid.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/NumberValidatorBase.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ICollectionView.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ISort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/spark-manifest.xml</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ISortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/BasicTests.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/DataGrid.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/NumberValidator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/olap/OLAPCube.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/CurrencyValidator.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections/SortField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/core/UIComponent.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/bundles/en_US/validators.properties</path>
<path kind="dir" action="A">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/collections</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mx/src/mx/controls/treeClasses/HierarchicalCollectionView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ListCollectionView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/Group.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/validators/supportClasses/GlobalizationUtils.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/olap/DefaultCubeImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/controls/AdvancedDataGridBaseEx.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/scripts/SortTestScript.mxml</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/Sort.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/framework/src/mx/collections/ModifiedCollectionView.as</path>
<path kind="file" action="A">/private/flex/sdk/branches/hero_private/frameworks/tests/basicTests/spark/views/SortTests.mxml</path>

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

--- frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
+++ frameworks/projects/advancedgrids/src/mx/collections/HierarchicalCollectionView.as
@@ -335,7 +335,7 @@
      *  @private
      *  Storage for the sort property.
      */
-    private var _sort:Sort;
+    private var _sort:ISort;

     [Bindable("sortChanged")]
     [Inspectable(category="General")]
@@ -343,7 +343,7 @@
     /**
      *  @private
      */
-    public function get sort():Sort
+    public function get sort():ISort
     {
         return _sort;
     }
@@ -351,7 +351,7 @@
     /**
      *  @private
      */
-    public function set sort(value:Sort):void
+    public function set sort(value:ISort):void
     {
         _sort = value;
     }
@@ -1194,7 +1194,7 @@

             if(sortLevel == 1)
             {
-                var srt:Sort = new Sort();
+                var srt:ISort = new Sort();

                 if(sort.usingCustomCompareFunction)
                 {
@@ -1224,7 +1224,7 @@
                     {
                         var coll:ICollectionView = getChildren(obj);

-                        var srt:Sort = new Sort();
+                        var srt:ISort = new Sort();

                         if(sort.usingCustomCompareFunction)
                             srt.compareFunction = sort.compareFunction;


Transferred from the Adobe Open Source Subversion Repository

Revision: 11660
Author:   rfrishbe@adobe.com
Date:     2009-11-11T18:42:54.860139Z

Log Message:
-----------
Change IItemRendererOwner’s updateRenderer() method definition to:

/**
 *  Updates the renderer for re-use. This first prepares the item
 *  renderer for re-use by clearing out any stale properties
 *  as well as updating it with new properties.
 *
 *
The last thing this method should do is set the data property
 *  on the renderer.

 *
 *  @param renderer The item renderer.
 *  @param itemIndex The index of the data in the data provider
 *  @param data The data object this item renderer is representing
 *
 *  @langversion 3.0
 *  @playerversion Flash 10
 *  @playerversion AIR 1.5
 *  @productversion Flex 4
 */
function updateRenderer(renderer:IVisualElement, itemIndex:int, data:Object):void;

Before, it only took one parameter, the renderer.  Now it takes 3.

The reason for this change is to make the code a little cleaner in terms of the separation between DataGroup and List.  Now DataGroup won’t do any work if the mx_internal _rendererUpdateDelegate is set.  If it is set (to a List for instance), then _rendererUpdateDelegate.updateRenderer(renderer, itemIndex, data) will be called.  This makes the updateRenderer() pass more clear because it’s all done in the rendererUpdateDelegate (rather than splitting it in DataGroup and ListBase).  It also makes it easier to get the ordering of properties correctly as we want the “data” property to be the last set property as part of the “item renderer contract”.

As part of this change, DataGroup is the default _rendererUpdateDelegate, and because of this it now implements IItemRendererOwner.  The only other method on IItemRendererOwner besides updateRenderer() is itemToLabel().  DataGroup already had a private itemToLabel() method, so I’m just making it public.

Also, I'm making label and itemIndex bindable to the "dataChange" event now.

QE notes: Please test that the data property is the last thing set
Doc notes: You could update the documentation around item renderers to mention that the data property should be the last thing set.
Bugs: SDK-19870, SDK-24086
Reviewer: Deepa
Tests run: checkintest, mustella list, listdragdrop, dropdownlist, combobox, buttonbar
Is noteworthy for integration: Yes

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/IItemRendererOwner.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ItemRenderer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/SkinnableDataContainer.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/DataGroup.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/ListItemDragProxy.as
@@ -221,15 +221,11 @@
         if (!newRenderer)
             return null;

-        // Set the data
-        newRenderer.data = data;
-
-        // set itemIndex
-        newRenderer.itemIndex = renderer.itemIndex;
-
-        // The lis tis the IItemRendererOwner for this renderer.
-        // It will update the renderer owner.
-        list.updateRenderer(newRenderer);
+        // The list is the IItemRendererOwner for this renderer.
+        // It will set all the properties on this renderer, based on
+        // the itemIndex and data.
+        list.updateRenderer(newRenderer, renderer.itemIndex, data);
+
         return newRenderer;
     }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 8576
Author:   cframpto@adobe.com
Date:     2009-07-15T12:19:18.531995Z

Log Message:
-----------
RichEditableText will dispatch all the FlexEvent.COMMIT_VALUE events and SkinnableTextBase will redispatch them for TextInput and TextArea.  Dispatched on focusOut, set text/content/textFlow, and for the insertText() and appendText() API calls.

Also changed a few validateNow() calls to validateProperties() because that is all that is needed and it is a much safer call.

QA Notes:
Doc Notes: SDK-21991
Reviewers: Alex

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/primitives/RichEditableText.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextArea.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/spark/src/spark/components/TextInput.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/SkinnableTextBase.as
@@ -785,6 +785,9 @@

             textDisplay.addEventListener(FlexEvent.ENTER,
                                          textDisplay_enterHandler);
+
+            textDisplay.addEventListener(FlexEvent.VALUE_COMMIT,
+                                         textDisplay_valueCommitHandler);
         }
     }

@@ -815,6 +818,9 @@

             textDisplay.removeEventListener(FlexEvent.ENTER,
                                             textDisplay_enterHandler);
+
+            textDisplay.removeEventListener(FlexEvent.VALUE_COMMIT,
+                                            textDisplay_valueCommitHandler);
         }
     }

@@ -1312,19 +1318,7 @@

         super.focusInHandler(event);
     }
-
-    /**
-     *  @private
-     */
-    override protected function focusOutHandler(event:FocusEvent):void
-    {
-        super.focusOutHandler(event);
-
-        // Trigger validation when leaving the field to test for required
-        // fields and invalid values.
-        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
-    }
-
+
     //--------------------------------------------------------------------------
     //
     //  Event handlers
@@ -1360,9 +1354,6 @@

         // Redispatch the event that came from the RichEditableText.
         dispatchEvent(event);
-
-        // The default event to trigger a validator.
-        dispatchEvent(new FlexEvent(FlexEvent.VALUE_COMMIT));
     }

     /**
@@ -1393,6 +1384,21 @@
         // Redispatch the event that came from the RichEditableText.
         dispatchEvent(event);
     }
+
+    /**
+     *  @private
+     *  Called when the RichEditableText dispatches an 'valueCommit' event
+     *  when values are changed programmatically or by user interaction.
+     *  Before the textDisplay part is loaded, any properties set are held
+     *  in textDisplayProperties.  We don't want to dispatch 'valueCommit' when
+     *  there isn't a textDisplay since since the event will be dispatched by
+     *  RET when the textDisplay part is added.
+     */
+    private function textDisplay_valueCommitHandler(event:Event):void
+    {
+        // Redispatch the event that came from the RichEditableText.
+        dispatchEvent(event);
+    }
 }

 }


R ASCII strings because UTF-8 does the job just right!

git-svn-id: 3704838867447408e01268abee7e32a5bd8c3d03@13 5cda2b45-c24c-6f34-eaa9-e0910a1cbe04

--- src/aerys/qark/Qark.as
+++ src/aerys/qark/Qark.as
@@ -20,10 +20,9 @@
 		private static const TYPE_UINT			: uint	= 4;
 		private static const TYPE_FLOAT			: uint	= 5;
 		private static const TYPE_STRING		: uint	= 6;
-		private static const TYPE_UTF_STRING	: uint	= 7;
-		private static const TYPE_BYTES			: uint	= 8;
-		private static const TYPE_BOOLEAN		: uint	= 9;
-		private static const TYPE_BITMAP_DATA	: uint	= 10;
+		private static const TYPE_BYTES			: uint	= 7;
+		private static const TYPE_BOOLEAN		: uint	= 8;
+		private static const TYPE_BITMAP_DATA	: uint	= 9;

 		private static const ENCODERS		: Array		= [encodeCustomObject,
@@ -33,7 +32,6 @@
 														   encodeUnsignedInteger,
 														   encodeFloat,
 														   encodeString,
-														   encodeUTFString,
 														   encodeBytes,
 														   encodeBoolean,
 														   encodeBitmapData];
@@ -45,7 +43,6 @@
 														   decodeUnsignedInteger,
 														   decodeFloat,
 														   decodeString,
-														   decodeUTFString,
 														   decodeBytes,
 														   decodeBoolean,
 														   decodeBitmapData];
@@ -59,7 +56,7 @@
 			if (source is Number)
 				return TYPE_FLOAT;
 			if (source is String)
-				return TYPE_UTF_STRING;
+				return TYPE_STRING;
 			if (source is Array)
 				return TYPE_ARRAY;
 			if (source is ByteArray)
@@ -191,8 +188,6 @@
 		{
 			var flag : uint = source.readByte();

-			trace(flag);
-
 			return DECODERS[flag].call(null, source);
 		}

@@ -253,30 +248,10 @@

 		private static function encodeString(source : String, target : ByteArray) : void
 		{
-			target.writeMultiByte(source, "iso-8859-1");
-			target.writeByte(0);
+			target.writeUTF(source);
 		}

 		private static function decodeString(source : ByteArray) : String
-		{
-			var byte : int = source.readByte();
-			var str : String = "";
-
-			while (byte != 0)
-			{
-				str += String.fromCharCode(byte);
-				byte = source.readByte();
-			}
-
-			return str;
-		}
-
-		private static function encodeUTFString(source : String, target : ByteArray) : void
-		{
-			target.writeUTF(source);
-		}
-
-		private static function decodeUTFString(source : ByteArray) : String
 		{
 			return source.readUTF();
 		}


Transferred from the Adobe Open Source Subversion Repository

Revision: 18871
Author:   smgilson@adobe.com
Date:     2010-11-30T20:10:44.561987Z

Log Message:
-----------
Fix ASDoc version tags

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

Modified Paths:
--------------
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/tabularData/SparkDataGridTabularData.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultComplexItemRendererAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkScrollBarBaseAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkComboBoxAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultItemRendererAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridHeaderRendererAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SprakTextAreaAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/spark/src/spark/components/gridClasses/GridItemEditor.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkItemRendererAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkDataGridAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/MobileIconItemRenderer.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/skins/spark/SparkDefaultGridItemRendererAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/supportClasses/StyleableTextField.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/components/TabbedViewNavigator.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/mobilecomponents/src/spark/styles/metadata/GapStyles.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkButtonBarBaseAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/mediaClasses/SparkVolumeBarAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/SparkButtonBarAutomationImpl.as</path>
<path kind="file" action="M">/private/flex/sdk/branches/hero_private/frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SprakSkinnableTextBaseAutomationImpl.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/mobilecomponents/src/spark/events/ViewNavigatorEvent.as</path>

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

--- frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkScrollBarBaseAutomationImpl.as
+++ frameworks/projects/automation_spark/src/spark/automation/delegates/components/supportClasses/SparkScrollBarBaseAutomationImpl.as
@@ -11,183 +11,183 @@

 package spark.automation.delegates.components.supportClasses
 {
-	import flash.display.DisplayObject;
-	import flash.events.Event;
-	import flash.events.IEventDispatcher;
-	import flash.events.MouseEvent;
-
-	import mx.automation.Automation;
-	import mx.automation.IAutomationObjectHelper;
-	import mx.core.mx_internal;
-	import mx.events.ScrollEvent;
-	import mx.managers.DragManager;
-
-	import spark.automation.events.SparkValueChangeAutomationEvent;
-	import spark.components.supportClasses.ScrollBarBase;
-
-	use namespace mx_internal;
-
-	[Mixin]
-	/**
-	 *
-	 *  Defines methods and properties required to perform instrumentation for the
-	 *  ScrollBarBase class.
-	 *
-	 *  @see spark.components.supportClasses.ScrollBarBase
-	 *
-	 *
-	 *  @langversion 3.0
-	 *  @playerversion Flash 9
-	 *  @playerversion AIR 1.1
-	 *  @productversion Flex 4
-	 */
-	public class SparkScrollBarBaseAutomationImpl extends SparkTrackBaseAutomationImpl
-	{
-		include "../../../../core/Version.as";
-
-		//--------------------------------------------------------------------------
-		//
-		//  Class methods
-		//
-		//--------------------------------------------------------------------------
-
-
-		/**
-		 *  Registers the delegate class for a component class with automation manager.
-		 *
-		 *  @param root The SystemManger of the application.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 4
-		 */
-		public static function init(root:DisplayObject):void
-		{
-			Automation.registerDelegateClass(spark.components.supportClasses.ScrollBarBase, SparkScrollBarBaseAutomationImpl);
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Constructor
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  Constructor.
-		 * @param obj ScrollBarBase object to be automated.
-		 *
-		 *  @langversion 3.0
-		 *  @playerversion Flash 9
-		 *  @playerversion AIR 1.1
-		 *  @productversion Flex 3
-		 */
-		public function SparkScrollBarBaseAutomationImpl(obj:spark.components.supportClasses.ScrollBarBase)
-		{
-			super(obj);
-
-			obj.addEventListener(Event.CHANGE, scrollHandler, false, -1, true);
-		}
-
-		/**
-		 *  @private
-		 *  storage for the owner component
-		 */
-		protected function get scroll():spark.components.supportClasses.ScrollBarBase
-		{
-			return uiComponent as spark.components.supportClasses.ScrollBarBase;
-		}
-
-		//----------------------------------
-		//  automationValue
-		//----------------------------------
-
-		/**
-		 *  @private
-		 */
-		override public function get automationValue():Array
-		{
-			return [ scroll.value.toString() ];
-		}
-
-		/**
-		 *  @private
-		 *  Replays ScrollEvents.
-		 *  ScrollEvents are replayed by simply setting the
-		 *  verticalScrollPosition or
-		 *  horizontalScrollPosition properties of the instance.
-		 */
-		override public function replayAutomatableEvent(interaction:Event):Boolean
-		{
-			if ( interaction is SparkValueChangeAutomationEvent)
-			{
-				var event:SparkValueChangeAutomationEvent = SparkValueChangeAutomationEvent(interaction);
-				var currentChange:int = event.value -  scroll.value;
-				var target:IEventDispatcher = null;
-				if(DragManager.isDragging)
-				{
-					scroll.value = event.value;
-					scroll.validateNow();
-				}
-				else
-				{
-					var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.CLICK);
-					if(currentChange == scroll.stepSize)
-					{
-						if(currentChange  > 0)
-							target = scroll.incrementButton;
-						else
-							target = scroll.decrementButton;
-					}
-					else
-					{
-						target = scroll.thumb;
-						if(currentChange  > 0)
-						{
-							mouseEvent.localX = scroll.width;
-							mouseEvent.localY = scroll.height;
-						}
-						else
-						{
-							mouseEvent.localX = 0;
-							mouseEvent.localY = 0;
-						}
-
-					}
-
-					scroll.value = event.value;
-					if (target)
-					{
-						var help:IAutomationObjectHelper = Automation.automationObjectHelper;
-						help.replayClick(target, mouseEvent);
-					}
-				}
-				return true;
-			}
-			else
-			{
-				return super.replayAutomatableEvent(interaction);
-			}
-		}
-
-		//--------------------------------------------------------------------------
-		//
-		//  Event handlers
-		//
-		//--------------------------------------------------------------------------
-
-		/**
-		 *  @private
-		 */
-		private function scrollHandler(event:Event):void
-		{
-			// the event does not give the details of the value. So we need to provide this
-			// so that replay can happen accordingly
-			var valueChangeEvent:SparkValueChangeAutomationEvent =
-				new SparkValueChangeAutomationEvent(
-					SparkValueChangeAutomationEvent.CHANGE,false,false,scroll.value);
-			recordAutomatableEvent(valueChangeEvent);
-		}
-
-	}
+    import flash.display.DisplayObject;
+    import flash.events.Event;
+    import flash.events.IEventDispatcher;
+    import flash.events.MouseEvent;
+
+    import mx.automation.Automation;
+    import mx.automation.IAutomationObjectHelper;
+    import mx.core.mx_internal;
+    import mx.events.ScrollEvent;
+    import mx.managers.DragManager;
+
+    import spark.automation.events.SparkValueChangeAutomationEvent;
+    import spark.components.supportClasses.ScrollBarBase;
+
+    use namespace mx_internal;
+
+    [Mixin]
+    /**
+     *
+     *  Defines methods and properties required to perform instrumentation for the
+     *  ScrollBarBase class.
+     *
+     *  @see spark.components.supportClasses.ScrollBarBase
+     *
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10
+     *  @playerversion AIR 1.5
+     *  @productversion Flex 4
+     */
+    public class SparkScrollBarBaseAutomationImpl extends SparkTrackBaseAutomationImpl
+    {
+        include "../../../../core/Version.as";
+
+        //--------------------------------------------------------------------------
+        //
+        //  Class methods
+        //
+        //--------------------------------------------------------------------------
+
+
+        /**
+         *  Registers the delegate class for a component class with automation manager.
+         *
+         *  @param root The SystemManger of the application.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public static function init(root:DisplayObject):void
+        {
+            Automation.registerDelegateClass(spark.components.supportClasses.ScrollBarBase, SparkScrollBarBaseAutomationImpl);
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Constructor
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  Constructor.
+         * @param obj ScrollBarBase object to be automated.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10
+         *  @playerversion AIR 1.5
+         *  @productversion Flex 4
+         */
+        public function SparkScrollBarBaseAutomationImpl(obj:spark.components.supportClasses.ScrollBarBase)
+        {
+            super(obj);
+
+            obj.addEventListener(Event.CHANGE, scrollHandler, false, -1, true);
+        }
+
+        /**
+         *  @private
+         *  storage for the owner component
+         */
+        protected function get scroll():spark.components.supportClasses.ScrollBarBase
+        {
+            return uiComponent as spark.components.supportClasses.ScrollBarBase;
+        }
+
+        //----------------------------------
+        //  automationValue
+        //----------------------------------
+
+        /**
+         *  @private
+         */
+        override public function get automationValue():Array
+        {
+            return [ scroll.value.toString() ];
+        }
+
+        /**
+         *  @private
+         *  Replays ScrollEvents.
+         *  ScrollEvents are replayed by simply setting the
+         *  verticalScrollPosition or
+         *  horizontalScrollPosition properties of the instance.
+         */
+        override public function replayAutomatableEvent(interaction:Event):Boolean
+        {
+            if ( interaction is SparkValueChangeAutomationEvent)
+            {
+                var event:SparkValueChangeAutomationEvent = SparkValueChangeAutomationEvent(interaction);
+                var currentChange:int = event.value -  scroll.value;
+                var target:IEventDispatcher = null;
+                if(DragManager.isDragging)
+                {
+                    scroll.value = event.value;
+                    scroll.validateNow();
+                }
+                else
+                {
+                    var mouseEvent:MouseEvent = new MouseEvent(MouseEvent.CLICK);
+                    if(currentChange == scroll.stepSize)
+                    {
+                        if(currentChange  > 0)
+                            target = scroll.incrementButton;
+                        else
+                            target = scroll.decrementButton;
+                    }
+                    else
+                    {
+                        target = scroll.thumb;
+                        if(currentChange  > 0)
+                        {
+                            mouseEvent.localX = scroll.width;
+                            mouseEvent.localY = scroll.height;
+                        }
+                        else
+                        {
+                            mouseEvent.localX = 0;
+                            mouseEvent.localY = 0;
+                        }
+
+                    }
+
+                    scroll.value = event.value;
+                    if (target)
+                    {
+                        var help:IAutomationObjectHelper = Automation.automationObjectHelper;
+                        help.replayClick(target, mouseEvent);
+                    }
+                }
+                return true;
+            }
+            else
+            {
+                return super.replayAutomatableEvent(interaction);
+            }
+        }
+
+        //--------------------------------------------------------------------------
+        //
+        //  Event handlers
+        //
+        //--------------------------------------------------------------------------
+
+        /**
+         *  @private
+         */
+        private function scrollHandler(event:Event):void
+        {
+            // the event does not give the details of the value. So we need to provide this
+            // so that replay can happen accordingly
+            var valueChangeEvent:SparkValueChangeAutomationEvent =
+                new SparkValueChangeAutomationEvent(
+                    SparkValueChangeAutomationEvent.CHANGE,false,false,scroll.value);
+            recordAutomatableEvent(valueChangeEvent);
+        }
+
+    }
 }


Transferred from the Adobe Open Source Subversion Repository

Revision: 6440
Author:   jszeto@adobe.com
Date:     2009-04-30T21:48:25.862370Z

Log Message:
-----------
DropDownList, DropDownController and PopUpAnchor API Changes

DropDownList changes:
- Changed open/close events from type mx.events.DropdownEvent to spark.events.DropDownEvent
- Changed button (skin part) to openButton
- Removed DropDownControllerClass property
- Changed dropDownController from public to protected
- Remove initializeDropDownController

DropDownController changes:
- Changed button to openButton
- Changed button_buttonDownHandler to openButton_buttonDownHandler
- Changed systemManager_mouseDownHandler argument from type MouseEvent to type Event
- Changed focusOutHandler to processFocusOut
- Changed keyDownHandler to processKeyDown

PopUp changes:
- Renamed class to PopUpAnchor
- Added autoSizePopUpHeight and autoSizePopUpWidth
- Changed open to displayPopUp
- Changed content to popUp
- Changed placement to popUpPosition
- Changed updateContentTransform to updatePopUpTransform
- Added "center" and "exact" popUpPosition values
- Only add the popUp to the PopUpManager if the PopUpAnchor is attached to the stage
- Fixed sizing of the popUp by setting the width/height instead of calling setActualSize
- Only apply transform changes to the popUp if it is currently displayed

Other changes:
- Added spark.events.DropDownEvent to replace mx.events.DropdownEvent
- Applied API updates to VideoPlayer sub-components and skins
- Fixed bug in SkinnableComponent when setting a skinPart to null
- Replaced List.list_keyDownHandler with inherited keyDownHandler function

QE Notes: API Changes
Doc Notes: API Changes
Bugs: None
Reviewer: Glenn

Modified Paths:
--------------
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/DropDownList.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/VideoPlayerFullScreenVolumeBarSkin.mxml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/DropDownController.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/spark-manifest.xml</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/List.as</path>
<path kind="file" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/events/DropDownEvent.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/skins/default/DropDownListSkin.mxml</path>
<path kind="file" copyfrom-path="/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUp.as" copyfrom-rev="6423" action="A">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUpAnchor.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/VideoPlayerVolumeBar.as</path>
<path kind="file" action="M">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/supportClasses/SkinnableComponent.as</path>
<path kind="file" action="D">/flex/sdk/trunk/frameworks/projects/flex4/src/spark/components/PopUp.as</path>

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

--- frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
+++ frameworks/projects/spark/src/spark/components/supportClasses/DropDownController.as
@@ -24,9 +24,11 @@
 import flash.utils.Timer;

 import mx.core.mx_internal;
-import mx.events.DropdownEvent;
 import mx.events.FlexEvent;
-
+import mx.events.SandboxMouseEvent;
+
+import spark.events.DropDownEvent;
+
 /**
  *  DropDownController handles the mouse, keyboard, and focus
  *  interactions for an anchor button and its dropDown. This helper class
@@ -48,9 +50,9 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
 	 */
-	public function DropDownController(target:IEventDispatcher=null)
+	public function DropDownController()
 	{
-		super(target);
+		super();
 	}

 	//--------------------------------------------------------------------------
@@ -60,28 +62,28 @@
     //--------------------------------------------------------------------------

 	//----------------------------------
-    //  button
+    //  openButton
     //----------------------------------

-	private var _button:ButtonBase;
-
-	/**
-     *  Reference to the button skin part of the dropDown component.
+	private var _openButton:ButtonBase;
+
+	/**
+     *  Reference to the openButton skin part of the dropDown component.
      *
      *  @langversion 3.0
      *  @playerversion Flash 10
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-	public function set button(value:ButtonBase):void
+	public function set openButton(value:ButtonBase):void
 	{
-		if (_button === value)
+		if (_openButton === value)
 			return;

 		removeOpenTriggers();
-
-		_button = value;
-
+
+		_openButton = value;
+
         addOpenTriggers();

 	}
@@ -89,9 +91,9 @@
 	/**
      *  @private
      */
-	public function get button():ButtonBase
+	public function get openButton():ButtonBase
 	{
-		return _button;
+		return _openButton;
 	}

 	//----------------------------------
@@ -145,7 +147,7 @@
     {
     	return _isOpen;
     }
-
+
     //----------------------------------
     //  rolloverOpenDelay
     //----------------------------------
@@ -155,7 +157,7 @@

     /**
      *  If set, this is the delay to wait for opening the drop down
-     *  when the button is rolled over.  If set to NaN, then the drop
+     *  when the openButton is rolled over.  If set to NaN, then the drop
      *  down will open on click, not rollover.
      *
      *  @default Number.NaN
@@ -189,43 +191,43 @@
     //
     //  Methods
     //
-    //--------------------------------------------------------------------------
-
-    /**
-     *  @private
-     *  Adds event triggers to the button to open the popup.
-     *
-     *
This is called from the button setter after the button has been set.

+    //--------------------------------------------------------------------------
+
+	/**
+     *  @private
+     *  Adds event triggers to the openButton to open the popup.
+     *
+     *
This is called from the openButton setter after the openButton has been set.

      */
     private function addOpenTriggers():void
     {
         // TODO (jszeto) Change this to be mouseDown. Figure out how to not
         // trigger systemManager_mouseDown.
-        if (button)
+        if (openButton)
         {
             if (isNaN(rollOverOpenDelay))
-                button.addEventListener(FlexEvent.BUTTON_DOWN, button_buttonDownHandler);
+                openButton.addEventListener(FlexEvent.BUTTON_DOWN, openButton_buttonDownHandler);
             else
-                button.addEventListener(MouseEvent.ROLL_OVER, button_rollOverHandler);
+                openButton.addEventListener(MouseEvent.ROLL_OVER, openButton_rollOverHandler);
         }
     }

     /**
      *  @private
-     *  Removes event triggers from the button to open the popup.
-     *
-     *
This is called from the button setter after the button has been set.

+     *  Removes event triggers from the openButton to open the popup.
+     *
+     *
This is called from the openButton setter after the openButton has been set.

      */
     private function removeOpenTriggers():void
     {
         // TODO (jszeto) Change this to be mouseDown. Figure out how to not
         // trigger systemManager_mouseDown.
-        if (button)
+        if (openButton)
         {
             if (isNaN(rollOverOpenDelay))
-                button.removeEventListener(FlexEvent.BUTTON_DOWN, button_buttonDownHandler);
+                openButton.removeEventListener(FlexEvent.BUTTON_DOWN, openButton_buttonDownHandler);
             else
-                button.removeEventListener(MouseEvent.ROLL_OVER, button_rollOverHandler);
+                openButton.removeEventListener(MouseEvent.ROLL_OVER, openButton_rollOverHandler);
         }
     }

@@ -238,17 +240,19 @@
     private function addCloseTriggers():void
     {
         // TODO (jszeto) Change these to be marshall plan compliant
-        if (button)
+        if (openButton)
         {
             if (isNaN(rollOverOpenDelay))
             {
-                button.systemManager.addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
-                button.systemManager.addEventListener(Event.RESIZE, systemManager_resizeHandler, false, 0, true);
+                openButton.systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
+    			openButton.systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE, systemManager_mouseDownHandler);
+    			openButton.systemManager.getSandboxRoot().addEventListener(Event.RESIZE, systemManager_resizeHandler, false, 0, true);
             }
             else
             {
-                button.systemManager.addEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler);
-                button.systemManager.addEventListener(Event.RESIZE, systemManager_resizeHandler, false, 0, true);
+                openButton.systemManager.getSandboxRoot().addEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler);
+                openButton.systemManager.getSandboxRoot().addEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, systemManager_mouseMoveHandler);
+                openButton.systemManager.getSandboxRoot().addEventListener(Event.RESIZE, systemManager_resizeHandler, false, 0, true);
             }
         }
     }
@@ -262,17 +266,19 @@
     private function removeCloseTriggers():void
     {
         // TODO (jszeto) Change these to be marshall plan compliant
-        if (button)
+        if (openButton)
         {
             if (isNaN(rollOverOpenDelay))
             {
-                button.systemManager.removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
-                button.systemManager.removeEventListener(Event.RESIZE, systemManager_resizeHandler);
+                openButton.systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_DOWN, systemManager_mouseDownHandler);
+    			openButton.systemManager.getSandboxRoot().removeEventListener(SandboxMouseEvent.MOUSE_DOWN_SOMEWHERE, systemManager_mouseDownHandler);
+    			openButton.systemManager.getSandboxRoot().removeEventListener(Event.RESIZE, systemManager_resizeHandler, false);
             }
             else
             {
-                button.systemManager.removeEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler);
-                button.systemManager.removeEventListener(Event.RESIZE, systemManager_resizeHandler);
+                openButton.systemManager.getSandboxRoot().removeEventListener(MouseEvent.MOUSE_MOVE, systemManager_mouseMoveHandler);
+                openButton.systemManager.getSandboxRoot().removeEventListener(SandboxMouseEvent.MOUSE_MOVE_SOMEWHERE, systemManager_mouseMoveHandler);
+                openButton.systemManager.getSandboxRoot().removeEventListener(Event.RESIZE, systemManager_resizeHandler);
             }
         }
     }
@@ -292,16 +298,16 @@
     	    addCloseTriggers();

     		_isOpen = true;
-    		button.mx_internal::keepDown = true; // Force the button to stay in the down state
+    		openButton.mx_internal::keepDown = true; // Force the button to stay in the down state

-    		dispatchEvent(new DropdownEvent(DropdownEvent.OPEN));
+    		dispatchEvent(new DropDownEvent(DropDownEvent.OPEN));
     	}
     }

     /**
-     *  Closes the dropDown and dispatches a DropdownEvent.CLOSE event.
+     *  Closes the dropDown and dispatches a DropDownEvent.CLOSE event.
      *
-     *  @param commitData Flag indicating if the component should commit the selected
+     *  @param commit Flag indicating if the component should commit the selected
      *  data from the dropDown.
      *
      *  @langversion 3.0
@@ -309,16 +315,16 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function closeDropDown(commitData:Boolean):void
+    public function closeDropDown(commit:Boolean):void
     {
     	if (isOpen)
     	{
 			_isOpen = false;
-			button.mx_internal::keepDown = false;
+			openButton.mx_internal::keepDown = false;

-        	var dde:DropdownEvent = new DropdownEvent(DropdownEvent.CLOSE, false, true);
+        	var dde:DropDownEvent = new DropDownEvent(DropDownEvent.CLOSE, false, true);

-        	if (!commitData)
+        	if (!commit)
         		dde.preventDefault();

         	dispatchEvent(dde);
@@ -342,16 +348,16 @@
  	 *  @playerversion AIR 1.5
  	 *  @productversion Flex 4
  	 */
-    protected function button_buttonDownHandler(event:Event):void
+    protected function openButton_buttonDownHandler(event:Event):void
     {
         if (isOpen)
             closeDropDown(true);
         else
             openDropDown();
     }
-
-    /**
-     *  Called when the button's rollOver event is dispatched. This function opens
+
+	/**
+     *  Called when the openButton's rollOver event is dispatched. This function opens
      *  the dropDown, or opens the drop down after the rollOverOpenDelay.
      *
      *  @langversion 3.0
@@ -359,13 +365,13 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function button_rollOverHandler(event:MouseEvent):void
+    protected function openButton_rollOverHandler(event:MouseEvent):void
     {
         if (rollOverOpenDelay == 0)
             openDropDown();
         else
         {
-            button.addEventListener(MouseEvent.ROLL_OUT, button_rollOutHandler);
+            openButton.addEventListener(MouseEvent.ROLL_OUT, openButton_rollOutHandler);
             rollOverOpenDelayTimer = new Timer(rollOverOpenDelay, 1);
             rollOverOpenDelayTimer.addEventListener(TimerEvent.TIMER_COMPLETE, rollOverDelay_timerCompleteHandler);
             rollOverOpenDelayTimer.start();
@@ -374,11 +380,11 @@

     /**
      *  @private
-     *  Called when the button's rollOut event is dispatched while waiting
+     *  Called when the openButton's rollOut event is dispatched while waiting
      *  for the rollOverOpenDelay.  This will cancel the timer so we don't open
      *  any more.
      */
-    private function button_rollOutHandler(event:MouseEvent):void
+    private function openButton_rollOutHandler(event:MouseEvent):void
     {
         if (rollOverOpenDelayTimer && rollOverOpenDelayTimer.running)
         {
@@ -386,7 +392,7 @@
             rollOverOpenDelayTimer = null;
         }

-        button.removeEventListener(MouseEvent.ROLL_OUT, button_rollOutHandler);
+        openButton.removeEventListener(MouseEvent.ROLL_OUT, openButton_rollOutHandler);
     }

     /**
@@ -395,7 +401,7 @@
      */
      private function rollOverDelay_timerCompleteHandler(event:TimerEvent):void
      {
-         button.removeEventListener(MouseEvent.ROLL_OUT, button_rollOutHandler);
+         openButton.removeEventListener(MouseEvent.ROLL_OUT, openButton_rollOutHandler);
          rollOverOpenDelayTimer = null;

          openDropDown();
@@ -410,9 +416,8 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function systemManager_mouseDownHandler(event:MouseEvent):void
-    {
-    	// TODO (jszeto) Make marshall plan compliant
+    protected function systemManager_mouseDownHandler(event:Event):void
+    {
     	if (!dropDown ||
     		(dropDown &&
     		 (event.target == dropDown
@@ -425,7 +430,7 @@

     /**
      *  Called when the dropdown is popped up from a rollover and the mouse moves
-     *  anywhere on the screen.  If the mouse moves over the button or the dropdown,
+     *  anywhere on the screen.  If the mouse moves over the openButton or the dropdown,
      *  the popup will stay open.  Otherwise, the popup will close.
      *
      *  @langversion 3.0
@@ -433,20 +438,21 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    protected function systemManager_mouseMoveHandler(event:MouseEvent):void
+    protected function systemManager_mouseMoveHandler(event:Event):void
     {
         var target:DisplayObject = event.target as DisplayObject;

         // if the mouse is down, wait until it's released
         // TODO (rfrishbe): Need to do something when they mouse up in
-        // this case if they mouseup outside of the button/dropdown.
-        if (event.buttonDown)
+        // this case if they mouseup outside of the openButton/dropdown.
+        if ((event is MouseEvent && MouseEvent(event).buttonDown) ||
+            (event is SandboxMouseEvent && SandboxMouseEvent(event).buttonDown))
             return;

         if (target)
         {
-            // check if the target is the button or contained within the button
-            if (button.contains(target))
+            // check if the target is the openButton or contained within the openButton
+            if (openButton.contains(target))
                 return;

             // check if the target is the dropdown or contained within the dropdown
@@ -486,7 +492,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
      */
-    public function focusOutHandler(event:FocusEvent):void
+    public function processFocusOut(event:FocusEvent):void
     {
         // Note: event.relatedObject is the object getting focus.
         // It can be null in some cases, such as when you open
@@ -518,7 +524,7 @@
      *  @playerversion AIR 1.5
      *  @productversion Flex 4
 	 */
-	public function keyDownHandler(event:KeyboardEvent):Boolean
+	public function processKeyDown(event:KeyboardEvent):Boolean
 	{

         if (event.ctrlKey && event.keyCode == Keyboard.DOWN)
@@ -558,4 +564,4 @@
 	}

 }
-}+}


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@1274706 13f79535-47bb-0310-9956-ffa450edef68

--- frameworks/projects/rpc/src/mx/utils/RPCUIDUtil.as
+++ frameworks/projects/rpc/src/mx/utils/RPCUIDUtil.as
@@ -1,3 +1,13 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  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.utils
 {


Change expected value to 2 in test.

Change expected value to 2 in test.

--- dolly-framework/src/test/actionscript/dolly/CloningOfCloneableClassTest.as
+++ dolly-framework/src/test/actionscript/dolly/CloningOfCloneableClassTest.as
@@ -33,7 +33,7 @@
 	public function findingAllWritableFieldsForType():void {
 		const writableFields:Vector.<Field> = Cloner.findAllWritableFieldsForType(cloneableClassType);
 		assertNotNull(writableFields);
-		assertEquals(4, writableFields.length);
+		assertEquals(2, writableFields.length);
 	}

 	[Test]


Transferred from the Adobe Open Source Subversion Repository

Revision: 5099
Author:   gauravj@adobe.com
Date:     2009-02-27T03:43:02.639229Z

Log Message:
-----------
Update action script files with asdoc version tags.

QE Notes: None.
Doc Notes: Please review and update as necessary.
tests: checkintests

Modified Paths:
--------------
147 paths were modified

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

--- frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceInfo.as
+++ frameworks/projects/rpc/src/mx/messaging/messages/MessagePerformanceInfo.as
@@ -48,74 +48,152 @@

 		/**
 	 	 * Size of message in Bytes (message types depends on what header this MPI is in)
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var messageSize:int;

 		/**
 	 	 * Millisecond timestamp of when this message was sent
 	 	 * (origin depends on on what header this MPI is in)
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var sendTime:Number = 0;

 		/**
 	 	 * Millisecond timestamp of when this message was received
 	 	 * (destination depends on on what header this MPI is in)
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var receiveTime:Number;

 		/**
 	 	 * Amount of time in milliseconds that this message was being processed on the server
 	 	 * in order to calculate and populate MPI metrics
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var overheadTime:Number;

 		/**
 	 	 * "OUT" when this message originated on the server
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		private var _infoType:String;

 		/**
 	 	 * True if this is info for a message that was pushed from server to client
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var pushedFlag:Boolean;

 		/**
 	 	 * Millisecond timestamp of when the server became ready to push this message out
 	 	 * to clients
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var serverPrePushTime:Number;

 		/**
 	 	 * Millisecond timestamp of when the server called into the adapter associated with the
 	 	 * destination of this message
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var serverPreAdapterTime:Number;

 		/**
 	 	 * Millisecond timestamp of when server processing returned from the adapater associated
 	 	 * with the destination of this message
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var serverPostAdapterTime:Number;

 		/**
 	 	 * Millisecond timestamp of when the adapter associated with the destination of this message
 	 	 * made a call to an external component (for example a JMS server)
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var serverPreAdapterExternalTime:Number;

 		/**
 	 	 * Millisecond timestamp of when processing came back to the adapter associated with the destination
 	 	 * of this message from a call to an external component (for example a JMS server)
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
 		public var serverPostAdapterExternalTime:Number;

 		/**
 	 	 * Flag is true when record-message-times is enabled for the communication channel
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
         public var recordMessageTimes:Boolean;

 		/**
 	 	 * Flag is true when record-message-sizes is enabled for the communication channel
+	 	 *
+	 	 *  @langversion 3.0
+	 	 *  @playerversion Flash 9
+	 	 *  @playerversion AIR 1.1
+	 	 *  @productversion BlazeDS 4
+	 	 *  @productversion LCDS 3
 	 	 */
         public var recordMessageSizes:Boolean;

@@ -131,6 +209,12 @@
 	   *  server)
 	   *
 	   * @param type - "IN" or "OUT" info type
+	   *
+	   *  @langversion 3.0
+	   *  @playerversion Flash 9
+	   *  @playerversion AIR 1.1
+	   *  @productversion BlazeDS 4
+	   *  @productversion LCDS 3
 	   */
 		public function set infoType(type:String):void
 		{
@@ -146,6 +230,12 @@
 	   *  Get the info type of this message (IN or OUT).
 	   *
 	   * @return "IN" or "OUT" (from the perspective of the server)
+	   *
+	   *  @langversion 3.0
+	   *  @playerversion Flash 9
+	   *  @playerversion AIR 1.1
+	   *  @productversion BlazeDS 4
+	   *  @productversion LCDS 3
 	   */
 		public function get infoType():String
 		{