PDA

View Full Version : Force a choice on a Radio button dialog



NewsArchive
10-09-2007, 01:58 AM
How?

Ideally I'd like to disable Next until a choice has been made, but can see
no way of doing this.

So I tried wrapping the choice dialog in a loop... testing for selection,
and breaking if choice or looping if none - but that GPF'd when testing (and
the VS debugger appeared!)

??
Steve

NewsArchive
10-09-2007, 01:58 AM
PS - I do *not* want to offer a default option.

Steve Bywaters

NewsArchive
10-09-2007, 01:59 AM
I played a bit, Steve, and either I or the cabernet ran into something that
didn't work as expected.

But the attached sorta does what you described.

Jane

NewsArchive
10-09-2007, 02:00 AM
Great!
Works just fine for me..

Where did you run across "%_SB_DIALOGNEXTID%"?
That's the key to it.

I'd keep slurping that Cab. Sav. if I were you.... it's clearly
inspirational <g>

thanks
Steve

NewsArchive
11-24-2007, 07:08 AM
Whoa.

Looks like the variables %_SB_DIALOGNEXTID% and %_SB_DIALOGID% are just
the part I have been missing to synchronize the wizard loop actions to
the active dialog. I am presuming (hoping) that I can skip dialogs by
setting %_SB_DIALOGNEXTID%.

The missing link!

Now, if I could just figure out how to have multiple radio dialogs in
the same wizard loop, and have them say different things. I change the
instructions on one, and SB changes all of them to say the same thing!

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
11-24-2007, 07:08 AM
Phil,

See "Dialog 2.sb6" in the Example package ;-)

The "Wizard: Show/Hide..." function in combination with %_SB_DIALOGID% is
the key to success :)

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.6
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
11-26-2007, 02:08 AM
Friedrich,

(BTW, I have finally licensed SB Developer, so you will now have me as a
constant complainer. :-) Maybe, occasionally I will say something nice
about SB)

I did find another thread where you said modifying dialognextid is a
no-no, but I solved all my dialog problems by myself last evening. See
my latest post on the thread "Best way to update RED file using SB 6.6
Developer" for my solutions to several issues at once.

I have looked at Dialog 2.sb6 per your instructions, but it has no
show/hide usage or any mention of the Dialogid variable. Maybe you have
a different version?

The examples offer some useful tips, but have drawbacks:
(1) Visibility. Because they are in a proprietary format, they have to
actually be loaded, one by one, into SB and examined line by line. They
can't be searched. or quickly thumbed through looking for techniques.
It would help if a searchable text version of the examples were
available, and actual examples of usage of %_SB_DIALOGID% and other
techniques were shown in the PDF manual.
(2) Pick list pollution. Loading the examples wipes my actual projects
out of the pick list, forcing me to go searching for them all over
again. I don't know any answer to this except don't open examples.
Thus, I am subtly discouraged from looking at examples. :-(

Phil Carroll

NewsArchive
11-26-2007, 02:09 AM
Phil,

> (2) Pick list pollution. Loading the examples wipes my actual projects
> out of the pick list, forcing me to go searching for them all over again.
> I don't know any answer to this except don't open examples. Thus, I am
> subtly discouraged from looking at examples. :-(

Perhaps it's still in the "Pick Project" dialog (lists more projects than
the "Get Started" page). You can click the arrow next to the Open toolbar
button to open the Pick Project dialog.

Friedrich

NewsArchive
11-26-2007, 02:09 AM
> (2) Pick list pollution. Loading the examples wipes my actual projects
> out of the pick list, forcing me to go searching for them all over
> again. I don't know any answer to this except don't open examples.
> Thus, I am subtly discouraged from looking at examples. :-(

Open TWO copies of SetupBuilder - look at the samples in one, work in the
other.

;-)

Charles

--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
11-26-2007, 02:17 AM
That eventually occurred to me. :-)

Now, if only one could copy (or drag and drop) from one script to
another. (Friedrich will probably finish that by Wednesday)

--
Phil Carroll
http://www.enablingsimplicity.com

Charles Edmonds wrote:

> Open TWO copies of SetupBuilder - look at the samples in one, work in the
> other.

NewsArchive
11-26-2007, 02:18 AM
> That eventually occurred to me. :-)

;-)

> Now, if only one could copy (or drag and drop) from one script to
> another. (Friedrich will probably finish that by Wednesday)

LOL - not if he keeps slacking off and closing for holidays.

Andrea wants a new house and Emily wants a pony<g>.

(wake up Friedrich - time to get back to work<vbg>)


Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
11-26-2007, 02:19 AM
Hi Phil,

>Now, if only one could copy (or drag and drop) from one script to
>another. (Friedrich will probably finish that by Wednesday)

Already can:) Just select what you need, Edit-Copy, then switch to
the other one and Edit-Paste:)

Best regards,

Arnór Baldvinsson
Icetips Creative, Inc.
San Antonio, Texas, USA
www.icetips.com


Subscribe to information from Icetips.com:
http://www.icetips.com/subscribe.php

NewsArchive
11-26-2007, 02:20 AM
I beg your pardon. Dialog 2 does have the kind of code I needed for
conditional show/hide. (I tend to think of it as skip or not skip a
dialog, but that is an issue for another day)

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
11-26-2007, 02:21 AM
Some more suggestions WRT SB examples:

The names "dialog 1" and "dialog 2" didn't exactly grab my attention as
being the rosetta stone to the problems I had. Perhaps a "guide to
examples" PDF or HTM would help, with topics like "How to make one
dialog depend on the outcome of another dialog". Or "How to synchronize
wizard loop to dialogs" or maybe just "How to code a wizard loop". With
cross references to example scripts. (The more redundancy the better,
if different terminology is used: it makes it more searchable)

But, even after being specifically directed to dialog 2 as my solution,
the solution did not leap out at me on a quick scan. A few comments in
the script would go a long way toward promoting understanding. Maybe
some of us are just slow learners. :-)

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
11-26-2007, 02:22 AM
Hi Phil,

Thank you for licensing SetupBilder :)

The problem is that SetupBuilder is a quite powerful system. You can create
a simple installation or applications in minutes, but there are also
companies with three of four full-time SetupBuilder developers. I have seen
scripts with 20,000-25,000 lines of SetupScript code.

So what we need is an improved documentation that covers the full range of
features and options. And more and better real-life examples. We are still
working on the "SetupBuilder Tips and Tricks, How-To, and Beyond" papers and
source code examples. I hope to have it available with SetupBuilder 7.

Thanks,
Friedrich

NewsArchive
11-26-2007, 02:23 AM
Friedrich,

I found what appears to be an error in example Dialog 2.sb6.

When I run the example and check all 3 boxes, the message displays that
I have checked ABC. Fine, so far. Then, I use the back button to
backtrack and uncheck option B. When I step forward from there, the
message again shows I have checked ABC!

I changed this:
! If next dialog = Topics then refresh dialog (IMPORTANT: #X - 1)
If %_SB_DIALOGNEXTID% Equals "2" Then
Refresh Next Dialog
End

to this:
! If next dialog = Topics then refresh dialog (IMPORTANT: #X - 1)
If %_SB_DIALOGNEXTID% Equals "3" Then
Refresh Next Dialog
End

(Changing "2" to "3") "2" is the password dialog, and "3" is the
"Topics" dialog that displays the message about the checked boxes.

This now works correctly, meaning if I backtrack, it now correctly
displays AC instead of ABC. I don't understand the comment. Or, if I
do, it seems to be wrong. Clarification?

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
11-26-2007, 02:23 AM
Phil,

Yes, you are right. It should read:

If %_SB_DIALOGNEXTID% Equals "3" Then

This will be fixed in the next update and then it will use "Dialog Labels"
instead of fixed dialog numbers.

Thanks for bringing this to my attention!

Friedrich

NewsArchive
11-26-2007, 02:24 AM
What you need to do to have separate text on different screens is to create
new text resources.
For example, create DLG_RADIOBUTTONS_TEXT2 with the different text you want,
then specify that as the dialog ID on the second radio button dialog screen.
Why this "complexity" of dialog IDs? Multiple language support (for those
who don't live in a country where everybody speaks the same language).
Entiende Usted??? <G>

Jane

NewsArchive
11-26-2007, 02:25 AM
Friedrich straightened me out. :-)

Seems I can:
1. Type the dialog text directly into the entry field
2. Type a variable or constant name into the field
3. Create my own text resource and put its name in the field
(in addition to using the default text resource)

My cup runneth over. :-)

--
Phil Carroll
http://www.enablingsimplicity.com

NewsArchive
11-26-2007, 02:26 AM
> Seems I can:
> 1. Type the dialog text directly into the entry field
> 2. Type a variable or constant name into the field
> 3. Create my own text resource and put its name in the field
> (in addition to using the default text resource)
>
> My cup runneth over. :-)

Cool beans<g>

I'd been doing 1-3, but had somehow missed #4 myself.

Learning SetupBuilder you will go through a number of those loops where you
email Friedrich and say "wouldn't it be great if SB could do ..." and he
emails you back and says "Like this???" (and shows you that it was staring
you in the face all along<g>)


;-)

Charles

--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------

NewsArchive
11-27-2007, 02:01 AM
>> Now, if only one could copy (or drag and drop) from one script to
>> another. (Friedrich will probably finish that by Wednesday)
>
> LOL - not if he keeps slacking off and closing for holidays.

<G> I was locked in a room with my Miami Vice DVDs Season 1-5 to work on
SetupBuilder 7 (alpha).

>
> Andrea wants a new house and Emily wants a pony<g>.
>

Not only a pony, my friend. My daughters wish list is growing by the
minute... <g>

>
> (wake up Friedrich - time to get back to work<vbg>)
>

<VBG> :)

Friedrich

NewsArchive
11-27-2007, 02:02 AM
Don't forget yourself, can you say "corporate jet"? <g> If you get one, I
suggest the first place you fly it is Chicago <seg>.


--
Russell B. Eggen
www.radfusion.com
Skype Clarion chat: http://tinyurl.com/2273lm

NewsArchive
11-27-2007, 02:03 AM
> <G> I was locked in a room with my Miami Vice DVDs Season 1-5 to work on
> SetupBuilder 7 (alpha).

Well let's face it, Don Johnson was cooler there than he ever was<g>.


> Not only a pony, my friend. My daughters wish list is growing by the
> minute... <g>

LOL - better you than me<g>.

;-)

Charles


--
-------------------------------------------------------------------------------------------------------
Charles Edmonds

www.clarionproseries.com - "Serious imaging tools for Clarion Developers"
www.ezround.com - "Round Corner HTML tables with matching Banners, Buttons
and Forms!"
www.lansrad.com - "Intelligent Solutions for Universal Problems"
www.fotokiss.com - "World's Best Auction Photo Editor"
-------------------------------------------------------------------------------------------------------