api/arrayaccess

Differences between version #6336 and #6337

7c7
< ArrayAccess is used to indicate a class that can be accessed using the [ ] operator. The type parameter specifies the type of accessed elements.
---
> An object of a class that implements this interface can be used with the ''[]'' operator syntax (also known as "array access" syntax), in the manner similar to how Array objects are used with it. The operator takes an integer parameter (in the square brackets) and returns elements of type ''T''.
10c10,34
< [/api]
\ No newline at end of file
---
> [/api]
> 
> ==== Example ====
> 
> <code haxe>
> //Following is a snippet from the standard Haxe library
> 
> package flash.xml;
> 
> extern class XMLList implements ArrayAccess<XML>
> </code>
> 
> In according with the above declaration, all [[/api/flash/xml/XMLList]] objects can be used with the following syntax:
> 
> <code haxe>
> var xml_list_obj: XMLList;
> 
> //...
> 
> /* Note that the [] operator implementation for the XMLList class 
> is part of the appropriate platform in this case. */
> 
> var xml_obj:XML = xml_list_obj[10]; //Return 10th XML node in the list
> 
> </code>
\ No newline at end of file

	
Ver Date Lg User Action
#15047 2012-07-16 12:30:51 fr api View | Diff
#15008 2012-07-16 12:29:54 en api View | Diff
#13603 2012-04-12 22:33:55 fr api View | Diff
#13545 2012-04-12 22:32:39 en api View | Diff
#12491 2012-02-21 16:10:44 en paletz Restored to version #6549
#12462 2012-02-21 15:49:05 en Anonymous View | Diff
#6581 2009-07-26 17:49:16 fr api View | Diff
#6549 2009-07-26 17:48:24 en api View | Diff
#6339 2009-07-15 17:42:01 en amn View | Diff
#6338 2009-07-15 17:41:17 en amn View | Diff
#6337 2009-07-15 17:40:31 en amn View | Diff
#6336 2009-07-15 17:10:32 en amn View | Diff
#5789 2009-04-16 17:45:36 fr bdasnois View | Diff
#4994 2008-11-24 11:46:41 fr api View | Diff
#4993 2008-11-24 11:46:41 fr api Set title to ArrayAccess
#4825 2008-11-02 15:36:39 fr exolium View | Diff
#2461 2008-07-28 10:02:38 en api View | Diff
#988 2008-05-02 19:19:10 en api View | Diff
#987 2008-05-02 19:19:10 en api Set title to ArrayAccess

Previous | Next