default handler for unknown properties.


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 a ); := 'mika';
a.language := 'delphi';
Now i have procedures in scripter like
a := NewDoc;

Yes, please refer to this topic: