Examples
You are viewing an old version of this entry, click here to see latest version.
The Iterable Typedef is really powerful, it's also possible to iterate a Class:
class MyClass { public static var names = ["ted", "fred", "tim"]; public static function iterator () : Iterator<String> { return names.iterator(); } } class Test { public static function main () { for (i in MyClass) trace(i); // ted, fred, tim } }
version #8030, modified 2010-02-05 13:49:07 by hhoelzer
0 comment