Don't like ads? PRO users don't see any ads ;-)

using Reflect; bug

By: jan_flanders on May 2nd, 2012  |  syntax: ActionScript 3  |  size: 0.35 KB  |  hits: 22  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. using Reflect;
  2.  
  3. class Foo
  4. {
  5.         @test
  6.         public var bar:String;
  7. }
  8.  
  9. class Main
  10. {
  11.         public static function main()
  12.         {
  13.                 var meta = haxe.rtti.Meta.getFields(Foo);
  14.                
  15.                 var fields = Reflect.fields(meta);
  16.                 var fields = meta.fields(); //You can't iterate on a Dynamic value, please specify Iterator or Iterable
  17.                
  18.                 for(f in fields)
  19.                         trace(f);
  20.         }
  21. }