Tooltriggers not fired for pbf files

Post bugs related to the IDE here
User avatar
HeX0R
Enthusiast
Enthusiast
Posts: 632
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Tooltriggers not fired for pbf files

Post by HeX0R »

None of the sourcecode triggers for external tools are fired for the form files (*.pbf).
No "sourcecode loaded" and no "sourcecode saved" (not sure about the "new sourcecode created" trigger).
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.
User avatar
Ajm
Enthusiast
Enthusiast
Posts: 217
Joined: Fri Apr 25, 2003 9:27 pm
Location: Kent, UK

Re: Tooltriggers not fired for pbf files

Post by Ajm »

You beat me to it. [WINKING FACE]

Regards

Andy
Regards

Andy

Image
Registered PB & PureVision User
User avatar
HeX0R
Enthusiast
Enthusiast
Posts: 632
Joined: Mon Sep 20, 2004 7:12 am
Location: Hell

Re: Tooltriggers not fired for pbf files

Post by HeX0R »

I had a quick look into the PB IDE source, and saw, that it needs some special handling, when you are looking at the design view of the form.
(SourceManagement.pb / SaveSourceFile() / line 1876)

Code: Select all

 If FormWindows()\current_view = 0 ; Design view, we need to use the special form save routine. In code view, we just save the code as any other source
      FD_Save(FileName$)
      ProcedureReturn 1
    EndIf
That means, the save trigger is handled, as soon as you switch to the code view (and press save afterwards).

The load trigger gets never activated, because here is missing a AddTools_Execute(#TRIGGER_SourceLoad, *ActiveSource)

(SourceManagement.pb / LoadSourceFile() / line 1700)

Code: Select all

 If LCase(GetExtensionPart(FileName$)) = "pbf"
    OpenForm(FileName$)
    RecentFiles_AddFile(FileName$, #False)
    LinkSourceToProject(*ActiveSource) ; Link To project (If any)
    ProcedureReturn 1
  EndIf
Link dead?
Change h3x0r.ath.cx into hex0rs.coderbu.de and all will be fine.
Post Reply