Skip Menu |

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

Report information
The Basics
Id: 54904
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: addTaskListPage: -*_photo options only work with filenames
Attempting to supply scalar ref Tk::Photo data to -todo_photo etc. fails. Option value is assumed to be a filename, not a data ref. Patch: =================================================================== --- Tasks.pm (revision 2.149) +++ Tasks.pm (working copy) @@ -129,9 +129,15 @@ if ( !$args->{$sArg} ) { $photos->{$state} = $self->Photo( $state, -data => $Tk::Wizard::Image::TASK_LIST{$state} ); } - elsif (!-r $args->{$sArg} - || !$self->Photo( $state, -file => $args->{$sArg} ) ) - { + elsif ( ref($args->{$sArg}) eq 'SCALAR' ) { + $photos->{$state} = $self->Photo( $state, -data => ${$args->{$sArg}} ) || + warn "# Could not read $sArg from referenced data " . ${$args->{$sArg}}; + } + elsif (-r $args->{$sArg}) { + $photos->{$state} = $self->Photo( $state, -file => $args->{$sArg} ) || + warn "# Could not read $sArg from file " . $args->{$sArg}; + } + else { warn "# Could not read $sArg from " . $args->{$sArg}; } } @@ -228,7 +234,7 @@ if ( Tk::Exists( $self->{nextButton} ) ) { $self->{nextButton}->configure( -state => "normal" ); - # $self->{nextButton}->invoke if $args->{ -continue }; + $self->{nextButton}->invoke if $args->{ -continue }; } }, # End of anonymous sub ===================================================================
Thanks for all the patches! -- lgoddard at cpan org http://www.LeeGoddard.net