Explorar o código

added deleteField

Nicolas Cannasse %!s(int64=19) %!d(string=hai) anos
pai
achega
aa7cec910b
Modificáronse 1 ficheiros con 9 adicións e 0 borrados
  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
+	}
+
 }