PDA

View Full Version : New Wizard Dialog Page - Ideas Please



NewsArchive
04-23-2016, 02:22 AM
I need to create a new page for our wizard loop.

But I also want to be able to re-use it in multiple SB files (we do a
whole lot of custom builds)

Is there a way to include a wizard page and its custom text resources
in an SBI file?

All I realy want to do is have a way to enter an additional pathname
for common resources along with the installation folder, but I'm not
sure what to do to get this into multiple projects.

Seemed like a new wizard page would be easiest, but I am not so sure.

Hep!

Thanks.


Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
04-25-2016, 04:22 AM
Hi Jeff,

I had to give it some thought. What about the following (please see the
attached screenshots and the demo project).

1. The "CommonDirDialog.sbi" include script holds the custom text resources
(defined and stored in compiler variables) and the dialog to select or enter
an additional pathname for common resources.

2. In the main project, you create a new variable that stores the common
resource pathname and add your "CommonDirDialog.sbi" include script.

This is the demo project (with source code):
http://www.lindersoft.com/projects/DialogsDemo.zip

What do you think?

Friedrich

NewsArchive
04-25-2016, 10:25 AM
BTW, to make it completely portable, you can also define the runtime
variable that stores the common resource pathname (in this example:
%MY_COMMONRESOURCEDIR%) in the "CommonDirDialog.sbi" include script.

Friedrich

NewsArchive
04-25-2016, 10:26 AM
Thanks a lot Friedrich. I'll see if I can understand it. :)

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
04-27-2016, 01:36 AM
Hi Friedrich -

This was a big help. Thank you.

I'm having one problem now that I haven't solved yet.

Keep in mind that it always works perfectly on first run, but if I
click BACK then NEXT, it doesn't refresh the data in the wizard
dialog.

Inside the wizard loop, I pass the main installation folder
(%_SB_INSTDIR%) to my DLL, which detects where the common files should
go. The function call is working fine, based on using MsgBOx in SB to
display the results.

This is what I'm currently doing:

Loop Wizard (Abort Dialog Active)
! BEGIN JEFF CODE
If %_SB_DIALOGNEXTID% Equals "3" Then
#include script "4clicks.DetectDataLocation.sbi" from
"T:\sb\include"
End
! END JEFF CODE
End

This works perfectly, and when I get to my special wizard page the
folder is in there correctly.

However, when I click BACK, and then enter a new %_SB_INSTDIR% then
click NEXT, my DLL function gets called again (successfully) and
detects a new folder.

The problem is that the folder name doesn't change on my wizard
dialog.

This works fine on first run, but not after clicking back/next.

Do I need to do something special to DISPLAY() my new value in my
special wizard page?

Thanks.

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
04-27-2016, 01:36 AM
Hi Jeff,

The following "Refresh Next Dialog" would do it in the dialogsdemo.sbp
example:

If %_SB_DIALOGNEXTID% Equals "$DLG_COMMONDIR$" Then
! Your code to set the new %MY_COMMONRESOURCESDIR% goes here
Refresh Next Dialog
End

Does this help?

Friedrich

NewsArchive
04-27-2016, 08:56 AM
Perfect! Thank you!

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.

NewsArchive
04-28-2016, 01:35 AM
And thanks for that too. It was my next question<g>

>"$DLG_COMMONDIR$"

Jeff Slarve
www.jssoftware.com
Twitter free since Jan 11, 2016
I'll search help files & Google for you.

Grammar troll's, are the worse.