How to import Type via DLL

edited 2:10AM in FastScript
Hi,

i want to register component-types via DLL to use them whitin a script.

i.e my DLL has functions like

ClassType : TClass
and
AncestorClassName : string

After reading the types from my application and registering them with addclass(ClassType, AncestorClassName) they are visible in the fsTreeView.
But using them in a script like TMyDllClass.Create(xxx) nothing appears or "TFont is not assignable with TFont".

Has somebody a hint, what i'm doing wrong?

Thanks a lot

seehauti

Comments

  • edited 2:10AM
    You can't use classes from dll because they have different RTTI. I.e. TFont from main application <> TFont from dll.
  • edited 2:10AM
    Hi Alex,

    thank you for your answer!
    Do you see any other possiblitys to import classes dynamicly?

    Ciao,

    seehauti
  • edited 2:10AM
    No, it's just not possible because IS and AS constructions will not work for different rtti's.

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.