IDE - API Question

Discuss the Integrated Development Environment (IDE)

Moderators: David Barker, Jerry Messina

Post Reply
johngb
Registered User
Registered User
Posts: 139
Joined: Tue Oct 03, 2006 10:16 pm

IDE - API Question

Post by johngb » Sun Feb 12, 2012 6:13 pm

Is there any way to stop a compile proceeding through the API after the Compile button has been pressed?

i.e. in the NotifyPreCompile Event could I do anything to abort the Compile?
JohnB

User avatar
David Barker
Swordfish Developer
Posts: 1214
Joined: Tue Oct 03, 2006 7:01 pm
Location: Saltburn by the Sea, UK
Contact:

Post by David Barker » Mon Feb 13, 2012 8:53 am

The original plugin sample pack has an example of this call, but in summary:

Code: Select all

// 1.0.1.1
procedure plgAbortCompile(pShowResults:BOOL);stdcall; external DLL_NAME name 'AbortCompile';
procedure plgAbortProgram;stdcall; external DLL_NAME name 'AbortProgram';
and

Code: Select all

      case Message.wParam of
         NOTIFY_PRE_COMPILE:
         begin
            plgAbortCompile(false);
            Caption := 'COMPILE ABORT!!';
         end;
         NOTIFY_PRE_PROGRAM:
         begin
            plgAbortProgram;
            Caption := 'COMPILE ABORT!!';
         end;

johngb
Registered User
Registered User
Posts: 139
Joined: Tue Oct 03, 2006 10:16 pm

Post by johngb » Mon Feb 13, 2012 9:15 am

Thanks Dave, I hadn't spotted that, I was just looking through the help file which doesn't mention it. Should have looked at cplugininterface.pas.
JohnB

Post Reply