Frank,
The Javascript in Delphi code depends on active script engine. and component of Windows. So no, the example I provided does not run on Linux. But, and dynamic methods and properties (as well as named optional arguments) are supported in Free Pascal, as long as you use a Variant (or OleVariant) type which references an IDispatch instance. You can your your own implementation of IDispatch on any platform, and the example I provided does that. See TScriptlet which converts a TComponent derived instance into an IDispatch and is thus compatible with dynamic and properties methods when addressed via a Variant. Example: MyVariant := TYourDispatchImplemention.Create as IDispatch; { and later } MyVariant.SomeMethod(12.5, 'ParamOne' := EditControl.Text); { Calls TYourDispatchImplemention GetIDsOfNames() passing 'SomeMethod', then Invoke() with the dispid from the prior method and arguments packed into a variant array }
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel