Hi,
I'm wondering is there possibility in pascal scripter to define default handler (get/set) for unknown properties of variable (variant), which would be called when otherwise not resolved.
So I could write
a.something :='value';
or if a.something = 'someone' ....
My use case is to use TDocVariant from mORMot library. In case you don't know it's quite awesome json document class based on variant. In delphi I can use it like
TDocVariant.new( a );
a.name := 'mika';
a.language := 'delphi';
Now i have procedures in scripter like
a := NewDoc;
setvalue(a,'name','mika');
showmessage(getvalue(a,'name'));
a := NewDoc;
setvalue(a,'name','mika');
showmessage(getvalue(a,'name'));