ソースを参照

added deleteField

Nicolas Cannasse 19 年 前
コミット
aa7cec910b
1 ファイル変更9 行追加0 行削除
  1. 9 0
      std/Reflect.hx

+ 9 - 0
std/Reflect.hx

@@ -142,4 +142,13 @@ class Reflect {
 			;
 	}
 
+	public static function deleteField( o : Dynamic, f : String ) {
+		#if flash
+			untyped __delete__(o,f);
+		#else neko
+			untyped __dollar__objremove(o,f.__s)
+		#else error
+		#end
+	}
+
 }