| Package | system.data.arrays |
| Class | public dynamic class ProxyArray |
| Inheritance | ProxyArray flash.utils.Proxy |
| Implements | Cloneable, Iterable, Serializable |
| Subclasses | TypedArray |
Example :
import system.data.arrays.ProxyArray ;
var a1:ProxyArray = new ProxyArray() ;
a1.push("item1") ;
a1.push("item2") ;
a1.push("item3") ;
a1.push("item4") ;
for (var prop:String in a1)
{
trace( prop + " : " + a1[prop] ) ;
}
trace("----") ;
for each( var item:in a1)
{
trace( item ) ;
}
trace("----") ;
trace("proxy array toString : " + a1) ;
trace("proxy array toSource : " + a1.toSource()) ;
var a2:ProxyArray = new ProxyArray( [[1, 2], [0, 4]] ) ;
var copy:ProxyArray = a2.copy() ;
copy[1][0] = 3 ;
copy[2] = [5,6] ;
copy[3] = [7,8] ;
trace(a2 + " : " + copy) ;
| Property | Defined By | ||
|---|---|---|---|
| _ar : Array
Internal Array reference used in the proxy pattern. | ProxyArray | ||
| Method | Defined By | ||
|---|---|---|---|
ProxyArray(datas:Array = null)
Creates a new ProxyArray instance. | ProxyArray | ||
clear():void
Removes all elements in the array. | ProxyArray | ||
clone():*
Creates and returns a shallow copy of the object. | ProxyArray | ||
isEmpty():Boolean
Indicates if the array is empty or not. | ProxyArray | ||
Returns the iterator of the object. | ProxyArray | ||
toArray():Array
Returns the Array representation of the object. | ProxyArray | ||
toSource(indent:int = 0):String
Returns the source code string representation of the object. | ProxyArray | ||
toString():String
Returns the source code string representation of the object. | ProxyArray | ||
| Method | Defined By | ||
|---|---|---|---|
callProperty(methodName:*, ... rest):* [override]
Overrides the behavior of an object property that can be called as a function. | ProxyArray | ||
getProperty(name:*):* [override]
Overrides any request for a property's value. | ProxyArray | ||
nextName(index:int):String [override]
Allows enumeration of the proxied object's properties by index number to retrieve property names. | ProxyArray | ||
nextNameIndex(index:int):int [override]
Allows enumeration of the proxied object's properties by index number. | ProxyArray | ||
nextValue(index:int):* [override]
Allows enumeration of the proxied object's properties by index number to retrieve property values. | ProxyArray | ||
setProperty(name:*, value:*):void [override]
Overrides a call to change a property's value. | ProxyArray | ||
| _ar | property |
protected var _ar:ArrayInternal Array reference used in the proxy pattern.
| ProxyArray | () | Constructor |
public function ProxyArray(datas:Array = null)Creates a new ProxyArray instance.
Parametersdatas:Array (default = null) |
| callProperty | () | method |
override flash_proxy function callProperty(methodName:*, ... rest):*Overrides the behavior of an object property that can be called as a function. When a method of the object is invoked, this method is called. While some objects can be called as functions, some object properties can also be called as functions.
Parameters
methodName:* | |
... rest |
* |
| clear | () | method |
public function clear():voidRemoves all elements in the array.
| clone | () | method |
public function clone():*Creates and returns a shallow copy of the object.
Returns* — a shallow copy of the object.
|
| getProperty | () | method |
override flash_proxy function getProperty(name:*):*Overrides any request for a property's value. If the property can't be found, the method returns undefined. For more information on this behavior, see the ECMA-262 Language Specification, 3rd Edition.
Parameters
name:* |
* |
| isEmpty | () | method |
public function isEmpty():BooleanIndicates if the array is empty or not.
ReturnsBoolean — true if the array is empty.
|
| iterator | () | method |
public function iterator():IteratorReturns the iterator of the object.
ReturnsIterator — the iterator of the object.
|
| nextName | () | method |
override flash_proxy function nextName(index:int):StringAllows enumeration of the proxied object's properties by index number to retrieve property names. However, you cannot enumerate the properties of the Proxy class themselves. This function supports implementing for...in and for each..in loops on the object to retrieve the desired names.
Parameters
index:int |
String |
| nextNameIndex | () | method |
override flash_proxy function nextNameIndex(index:int):intAllows enumeration of the proxied object's properties by index number. However, you cannot enumerate the properties of the Proxy class themselves. This function supports implementing for...in and for each..in loops on the object to retrieve property index values.
Parameters
index:int |
int |
| nextValue | () | method |
override flash_proxy function nextValue(index:int):*Allows enumeration of the proxied object's properties by index number to retrieve property values. However, you cannot enumerate the properties of the Proxy class themselves. This function supports implementing for...in and for each..in loops on the object to retrieve the desired values.
Parameters
index:int |
* |
| setProperty | () | method |
override flash_proxy function setProperty(name:*, value:*):voidOverrides a call to change a property's value. If the property can't be found, this method creates a property with the specified name and value.
Parameters
name:* — The name of the property to modify.
| |
value:* — The value to set the property to.
|
| toArray | () | method |
public function toArray():ArrayReturns the Array representation of the object.
ReturnsArray — the Array representation of the object.
|
| toSource | () | method |
public function toSource(indent:int = 0):StringReturns the source code string representation of the object.
Parameters
indent:int (default = 0) |
String — the source code string representation of the object.
|
| toString | () | method |
public function toString():StringReturns the source code string representation of the object.
ReturnsString — the source code string representation of the object.
|