|
#1
|
|||
|
|||
prompting for save behavior
I've come across an annoyance, and don't know whether it's a bug, or a feature. :-) Normally when I make changes to a VBPro script and I forget to save my changes, VBPro will ask me if I want to save the project before exiting, no matter whether the script is currently running or not.
However, if I start the build with the right-click "Build" option from Windows Explorer, it will not prompt me to save my project before exiting if the build is running when I exit, and will just exit without prompting for saving of the project script. If I exit this right-click-started build script with it not running, it will still prompt for a save. It appears to not prompt for a save only if the build has been started by the "Build" explorer extension, and the project is currently running when I exit. Other than the obvious "save often" mantra, is this a bug, or a feature? Thanks! Scott |
#2
|
|||
|
|||
This is actually a bug. If VBP is started like
VisBuildPro /b project.bld and exited while a build is running (and the build is aborted), unsaved changes to the project will not get saved. This apparently isn't a very common scenario (modifying the project after starting in that fashion and then exiting VBP while the build is still running), since it wasn't reported in the last 6 (!) years. You can work around the problem by either 1) Always stop the build before exiting or 2) Add a global build done script event like so (View | Other Windows | Script Editor -> Global tab): Code:
Sub vbld_BuildDone(status) ' ensure any unsaved changes are saved if the build is aborted ' since if the build was started via /b filename.bld and VBP v6 ' is exited while building, it won't prompt for unsaved changes ' to the project If status = vbldStepStatAborted And Project.IsModified Then Project.Save End Sub We'll fix this in the next version of VBP. Thanks. |
|
|