Page 1 of 1

[PB5.3] Reload Source after tool has quit.

Posted: Sat Sep 27, 2014 6:59 pm
by SniffTheGlove
I have a problem with "Reload Source after tool has quit" in the Configure Tools Settings section.

PB 5.21LTS Works
PB 5.30 x86 and PB 5.30 x64 Fails

Now in PB 5.21
Open Configure Tools.
Create a new tool
Chose an exe.
Tick Wait until tool quits
Place %FILE %TEMPFILE into Arguments
The "Reload Source after tool has quit" become enable to make a selection.
Cancel (as there is no need to actually create the tool)

Now in 5.30 (x86 and x64) do the same.
Open Configure Tools.
Create a new tool
Chose an exe.
Tick Wait until tool quits
Place %FILE %TEMPFILE into into Arguments
The "Reload Source after tool has quit" does not become available to make any selection. ie it is still greyed out.
Cancel (as there is no need to actually create the tool)

Re: [PB5.3] Reload Source after tool has quit.

Posted: Sun Sep 28, 2014 12:42 am
by PB
SniffTheGlove wrote:Now in 5.30 (x86 and x64) do the same.
Open Configure Tools.
Create a new tool
Chose an exe.
Tick Wait until tool quits
Place %FILE %TEMPFILE into into Arguments
The "Reload Source after tool has quit" does not become available to make any selection. ie it is still greyed out.
I followed your steps and it works fine here (Reload source is enabled).
I'm running PureBasic 5.30 (x86) on a 64-bit Win 7 PC.


Image

Re: [PB5.3] Reload Source after tool has quit.

Posted: Sun Sep 28, 2014 9:12 am
by SniffTheGlove
I tried some more and then just copied what you had in that posted image. And Volia It became available. It seems to be also dependant on the Event Type.

Could you try the same again PB in your image but this time on the "Event to trigger the tool:" select Before Compile/Run from the dropdown.


I went through the dropdown events and this is what happened to "Reload Source"

Menu or Shortcut = Available
Editor Startup = Disabled
Editor Closing = Disabled
Before Compile/Run = Disabled
After Compile/Run = Disabled
Run Compiled Program = Available
Before Create Executable = Available
After Create Executable = Available
Sourcecode loaded = Available
Sourcecode saved = Available
Replace Fileviewer - All files = Disabled
Replace Fileviewer - unknown files = Disabled
Replace Fileviewer - Special file = Disabled
Sourcecode closed = Available
New Sourcecode created = Available

So it looks like my misunderstanding of things (as usual)

What I was trying to do was run a little preprocessor on the sourcecode to make some changes/additions. Then reload the new soucecode and save it then process it through the compiler to compile/run.

Re: [PB5.3] Reload Source after tool has quit.

Posted: Sun Sep 28, 2014 1:32 pm
by IdeasVacuum
What I was trying to do was run a little preprocessor on the sourcecode to make some changes/additions. Then reload the new sourcecode and save it then process it through the compiler to compile/run.
So 'Sourcecode saved' should fit your requirement? If your tool runs after sourcecode save, you have the benefit of being able to re-load the source if the tool does something unexpected. I would not have the tool change the source and then run - too risky.