Skip Menu |

This queue is for tickets about the Tk-Wizard CPAN distribution.

Report information
The Basics
Id: 54576
Status: resolved
Priority: 0/
Queue: Tk-Wizard

People
Owner: Nobody in particular
Requestors: keszler [...] srkconsulting.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.149
Fixed in: (no value)



Subject: addSingleChoicePage forgets choice when Back button used
The addSingleChoicePage method sets the default choice when the Back button is used, ignoring any other selection the user previously set. This patch allows the user's choice to be remembered, or even pre-selected via code by setting the -variable. It also allows an invalid -variable to be set via code before the user sees the page, making none of the choices set by default. A -*NextButtonAction check can then ensure that the user consciously made a selection. =================================================================== --- Choices.pm (revision 73) +++ Choices.pm (working copy) @@ -280,8 +280,8 @@ -activebackground => $self->{background}, )->pack(qw/-side top -anchor w /); - ${ $args->{-variable} } = $sValue if not $not_first_page++; - ${ $args->{-variable} } = $sValue if $opt->{-selected}; + ${ $args->{-variable} } ||= $sValue if not $not_first_page++; + ${ $args->{-variable} } ||= $sValue if $opt->{-selected}; my $s = $opt->{-subtitle} || ''; ===================================================================
Very nice, thanks. -- lgoddard at cpan org http://www.LeeGoddard.net