Any ideas what's going on here?
showmessage(TComponent(MainForm).classname);
gives TScriptForm
but get the following error
uses
Classes, Graphics, Controls, Forms, Dialogs, Unit2;
var
MainForm: TForm2;
begin
MainForm := TForm2.Create(Application);
{This won't work}
MainForm.Show;
{
---------------------------
Debugger Exception Notification
---------------------------
Project BIScripter.exe raised exception class EatCompileError with message 'Unit Unit1: Unknown member identifier: 'Show'.
Source position: 9,16'.
---------------------------
Break Continue Help
---------------------------
}
{This will work}
TForm(MainForm).Show;
end;