You are not logged in.
Pages: 1
I call procedure TSMObject.DefineProperty(const name: SynUnicode; const value: variant) like this:
smObj.DefineProperty('propName', 'propValue');
Then it raise 'Unhandled variant type 21' - ESMException.
I read the source clearly and found the kernal rutine
procedure TSMObject.DefineProperty(const name: SynUnicode;
const value: variant; attrs: TJSPropertyAttrs);
begin
DefineProperty(name,VariantToJsVal(cx,value),attrs);
end;
See that? VariantToJsVal cast the value into correct jsval, but it return a jsval type, and no proper DefineProperty() accept this param..so it call itself again..
Try to patch this, I wrote codes instead:
DefineProperty(name,TSMValue(VariantToJsVal(cx,value)),attrs);
Exception has no raise again.
I love the beautiful SynSM, thanks mpv's times.
Regard.
Offline
Should be fixed by http://synopse.info/fossil/info/ab0acc6 … 38a0705b19
Thanks for the fix and feedback!
You are now part of the credits.
Offline
Pages: 1