Access procedures and other attributes of object added.
I have used "AddObject" to add an object to the script. I can successfully access the "published properties" of the object. Is it also allowed to access other members of the object like it's private or public functions and procedures directly? I get stack overflow errors when I try to do this, and am not sure if what I am doing is allowed, or if I'm simply not doing it right.
Thanks,
Carl.
Thanks,
Carl.
Comments
Yes. Now, if I could just remember how....
Going from memory here, I had an object I made that was descended from a TPaintBox as in "TMyObject=class(TPaintBox)".
I attempted to register it like this:
TempScript.AddClass(TMyObject,'TMyObject');
What worked, was instead of passing in TMyObject, I pass in some distant ancestor, like the "TPaintBox" I made it from, like this:
TempScript.AddClass(TMyObject,'TPaintBox');
That seemed to do the trick, though I am not 100% sure I know what I am doing. My guess is that by sending TMyType, the script engine does not know what I'm talking about, since maybe it's not visible to it, but when I pass "TPaintBox", which is a common thing already exposed to the script engine, it works.
I hope this is at least a little bit helpful to you.