Unknown methods

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;  

Where does this happen? The code you mentioned is the very basic code that is automatically generated by the IDE. Just running IDEPro demo and running the empty project will work here. Maybe you have wrong ap_*.pas files in your search path directory?