PDA

View Full Version : Forcing use of browse to select a folder



Tom H.
07-17-2014, 01:01 PM
Hi Friedrich,

Feature request here, unless you already have a way to do it...

Background: In our programs we force a specific folder name for the program installation to ensure that it is installed in its own location (our programs are tax/year specific and cannot be installed over prior year versions like more generic programs.) We always provide the desired path/folder structure as the default SB install dir.

In the built-in 'Select Install Folder' dialog, you have an option to append a specified folder to the selected path. That works great if you use the browse button, but if you simply type something into the entry control, nothing is appended and we could up in an undesired folder.

I know I can trap for that in the script, but it would be a lot more convenient if the dialog either:
a) always checked to see if it should append when the dialog is completed or
b) had an option to disable the entry control so that the user always uses the browse button, which would append it correctly.

Option B would work fine for us and seems pretty simple to add (haha -- I love saying that to other programmers!;))

Thanks,
Tom

Tom H.
07-18-2014, 10:20 AM
A little more on this.

I've added some scripting to ensure that the required folder is appended to the path, but there doesn't seem to be any way to get the dialog to reinitialize or display the modified value other than going one dialog back, then forward again.

For example:
- On first entry, %_SB_InstallDir% is pre loaded with a default path of "C:\Somewhere\RequiredFolder".
- User manually changes that to "C:\Somewhere\Else" and clicks next.
- I trap the change, display a message that the program must be installed in 'RequiredFolder' and reset %_SB_InstallDir% to "C:\Somwhere\Else\RequiredFolder".

If I cycle the loop after displaying the message, the dialog remains continues to show the originally modified (bad) path, and pressing Next goes through the cycle of check/message again. If I don't loop so that Next goes to the following dialog, press back, the unmodified path is still displayed and the check/message is displayed again.

So, how can I force a dialog to update the displayed value without nexting into it from the previous dialog. I've tried 'Refresh next dialog' before looping, using event init and reopen and none of it has any effect.

Sorry if this seems confusing...

Thanks,
Tom

RDaley
07-18-2014, 01:39 PM
Tom,

Do you have a small project that demonstrates this? I'll then try to modify it accordingly.

Tom H.
07-18-2014, 05:21 PM
I'll put one together in the next day or so and email it to support.

Thanks,
Tom

CleanFacets
08-31-2017, 09:11 AM
I have this same problem. _sb_installdir is changed and upon clicking Next I can show a message box that shows the new install folder, but the following dialog displays _sb_installdir in a description which does not change to the new path.
What is the fix for this?
Thanks,
Carl

linder
09-01-2017, 03:56 AM
Hi Carl,

just send your .sbp file to support [at] lindersoft [dot] com and we'll fix it in your project for you.

Friedrich

linder
09-01-2017, 06:59 AM
Or send a small demo project and we'll make the required modifications for you.

Friedrich

CleanFacets
09-11-2017, 05:14 PM
Thank you Friedrich. I received the sample app and it worked just as expected.

linder
09-12-2017, 03:12 AM
Thanks for the update, Carl!

Friedrich