Access procedures and other attributes of object added.

edited 1:29PM in FastScript
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.

Comments

  • edited April 2013
    doncht wrote: »
    Hi Carlo, sorry to bump up this old post but by any chance, have you managed to find a work around here?

    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.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.