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

Working on new editor enhancements?
SniffTheGlove
Enthusiast
Enthusiast
Posts: 122
Joined: Sat Nov 19, 2011 6:51 pm

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

Post 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)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

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

Post 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
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
SniffTheGlove
Enthusiast
Enthusiast
Posts: 122
Joined: Sat Nov 19, 2011 6:51 pm

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

Post 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.
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

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

Post 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.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Post Reply