--- parser3/src/classes/reflection.C 2016/09/26 20:38:33 1.57 +++ parser3/src/classes/reflection.C 2016/09/27 21:11:18 1.58 @@ -10,7 +10,7 @@ #include "pa_vbool.h" #include "pa_vobject.h" -volatile const char * IDENT_REFLECTION_C="$Id: reflection.C,v 1.57 2016/09/26 20:38:33 moko Exp $"; +volatile const char * IDENT_REFLECTION_C="$Id: reflection.C,v 1.58 2016/09/27 21:11:18 moko Exp $"; static const String class_type_methoded("methoded"); @@ -363,9 +363,16 @@ static void _uid(Request& r, MethodParam } static void _delete(Request&, MethodParams& params) { + Value* v=¶ms.as_no_junction(0, "param must be object or class, not junction"); const String& key=params.as_string(1, "field name must be string"); - if(HashStringValue* fields=params[0].get_fields()){ - fields->remove(key); + + if(VObject* o=dynamic_cast(v)){ + o->get_fields()->remove(key); + } else if(VClass* c=dynamic_cast(v)){ + HashStringProperty &p=*c->get_properties(); + if(Property* property=p.get(key)) + if(property->value) + p.remove(key); } }