ERROR: "Incompatible types:" -- Already RTM

edited August 2004 in FastScript
When I use your example;

type
TJCLFileVersionInfo= class(TObject)
...
end;
....

with fsScript1.AddClass(TJclFileVersionInfo,'TObject') do
AddConstructor('constructor Create(const FileName: string)',CallMethodFileInfo);
...

function TfsScriptDM.CallMethodFileInfo(Instance: TObject; ClassType: TClass;
const MethodName: String; var Params: Variant): Variant;
begin
Result := Integer(TJclFileVersionInfo(Instance).Create(Params[0]));
end;

=======
script
program test;

var fi : TJCLFileVersionInfo;

begin
fi := TJCLFileVersionInfo.Create('c:\trek-setup.exe');
Writeln(fi.fileversion);
end.
========

and then when it runs it errors WITH:

Incompatible types: 'Class TJclFileVersionInfo', 'Class TJclFileVersionInfo'

I don't understand why? Looks correct to me.
I reviewed docs and code but couldn't find anything that helps.
Can you point me in the right direction?

Thanks,
Brian

Comments

  • edited September 2004
    Okay I got this fixed ( after two days of waiting )

    I tried fsGlobalUnit instead of fsScript1 (not documented that way, but)

    and it worked.

    STILL not sure why my other forum question does not work or why nobody will answer.

    Is this common for support ?

    Brian ;)

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.