dbadmin
dbadmin copied to clipboard
admin.hx:221
Sometime toString() call fails, I use something alike :
var str = null;
try{ str = defval.toString();} catch(d:Dynamic){};
if( str==null){
try { str = Std.string( defval ); } catch (d:Dynamic) { };
}
if( str!=null)
defval = new Serialized(str).escape();
else {
defval="#unknown";
}
But I don't really get the whole picture so it might induce problems... so maybe you can do an improvement here :)
thx
defval.toString() and Std.string(defval) should do exactly the same thing. Why is toString failing in the first place?
try{ defval = new Serialized(defval.toString()).escape(); }catch(d:Dynamic){ throw d+" "+defval;};
Invalid call defaval = {} Called from sys.db.Admin::inputField line 235 Called from a C function Called from sys.db.Admin::edit line 519 Called from sys.db.Admin::process line 1052 Called from sys.db.Admin::handler line 1079
:)