Page 1 of 1
Tooltriggers not fired for pbf files
Posted: Sun Apr 04, 2021 7:09 pm
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).
Re: Tooltriggers not fired for pbf files
Posted: Sun Apr 04, 2021 7:22 pm
by Ajm
You beat me to it. [WINKING FACE]
Regards
Andy
Re: Tooltriggers not fired for pbf files
Posted: Mon Apr 05, 2021 9:16 pm
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