Skip Menu |

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

Report information
The Basics
Id: 26607
Status: resolved
Estimated: 20 min
Worked: 10 min
Priority: 0/
Queue: Tk-Wizard

People
Owner: MTHURN [...] cpan.org
Requestors: MTHURN [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 2.003
Fixed in: 2.005



Subject: need chomp before displaying copyright
When displaying a copyright statement from a file, \x{d} appears in the Text widget. Consider fixing line-endings before inserting text into the widget? -- - - Martin 'Kingpin' Thurn
From: LGODDARD [...] cpan.org
Could you put a sample of the problem text up here, please? Have uploaded t/15_Text.t, a test stub, which I'll complete if we can get the test data. I would put it on the SF cvs, but turns out although my latest PC has CVS, it doesn't have SSH yet....
#! perl -w =head1 NAME 15_Text.t - test text widgets =head1 DESCRIPTION Need to get a full report of the case from the user. =cut use ExtUtils::testlib; use Test::More no_plan; BEGIN { use_ok('Tk::Wizard'); } my $VERSION = do { my @r = (q$Revision: 1.5 $ =~ /\d+/g); sprintf "%d."."%03d" x $#r, @r }; use strict; use FileHandle; autoflush STDOUT 1; use Cwd; my $root = cwd =~ /\/t$/? '..' : '.'; use vars qw/$GET_DIR $GET_FILE $user_chosen_dir $user_chosen_file $SPLASH/; our $WAIT = 1; # # Instantiate Wizard # my $looped = 0; foreach my $style ('top', '95') { my $wizard = new Tk::Wizard( -title => "Test v$VERSION For Wizard $Tk::Wizard::VERSION", -style => $style, ); isa_ok($wizard, "Tk::Wizard"); $wizard->configure( -preNextButtonAction => sub { &preNextButtonAction($wizard); }, -finishButtonAction => sub { ok(1, 'user clicked finish'); }, ); isa_ok($wizard->cget(-preNextButtonAction), "Tk::Callback"); # # Create pages # $SPLASH = $wizard->addPage( sub{ page_splash ($wizard,$looped)} ); is( $SPLASH, 1); is( $wizard->addPage( sub{ page_text_textbox1($wizard) }), 2); is( $wizard->addPage( sub{ page_text_textbox2($wizard) }), 3); isa_ok($wizard->parent, "Tk::MainWindow"); $wizard->Show; MainLoop(); ok(1); undef $wizard; } exit; sub page_splash { my ($wizard, $looped) = (shift, shift); my ($frame,@pl) = $wizard->blank_frame( -wait => $WAIT, -title => ($looped==0? "Welcome to the Wizard" : "Testing the Old Style"), -subtitle =>"RT Case 26607", -text => "User case: RT 26607 = http://rt.cpan.org/Ticket/Display.html?id=26607", ); return $frame; } sub page_text_textbox1 { my $wizard = shift; # diag('start page_text_textbox1'); my $text = "This is in a box: " ."string literal, with \\n\n...and \\r\r...and \\f\fand \\t\t..."; my $frame = $wizard->text_frame( -wait => $WAIT, -title =>"1: Test" -boxedtext => \$text, ); $frame return $frame; } sub page_text_textbox2 { my $wizard = shift; # diag('start page_text_textbox2'); my $frame = $wizard->text_frame( -wait => $WAIT, -title =>"2: Text from filename", -boxedtext => $root.'/perl_licence_blab.txt', ); return $frame; } sub preNextButtonAction { my $wizard = shift; # diag("start preNextButtonAction, wizard is $wizard"); local $_ = $wizard->currentPage; return 1; } __END__
Subject: RE: [rt.cpan.org #26607] need chomp before displaying copyright
Date: Wed, 25 Apr 2007 18:08:49 -0400
To: <bug-Tk-Wizard [...] rt.cpan.org>, <MTHURN [...] cpan.org>
From: "Martin Thurn" <mthurn [...] verizon.net>
OK I tested on Windows and it works fine. Must only happen on Solaris and/or Linux, I'll test them on Friday at work. - - Martin No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.0/775 - Release Date: 4/24/2007 5:43 PM
From: LGODDARD [...] cpan.org
On Wed Apr 25 18:10:11 2007, mthurn@verizon.net wrote: Show quoted text
> OK I tested on Windows and it works fine. Must only happen on > Solaris and/or Linux, I'll test them on Friday at work.
Thanks, Martin. If you could put the test data up here, I can test on Debian Sarge straight away! Cheers Lee
Subject: RE: [rt.cpan.org #26607] Text boxedtext Line Endings?
Date: Sat, 28 Apr 2007 00:28:50 -0400
To: <bug-Tk-Wizard [...] rt.cpan.org>
From: "Martin Thurn" <mthurn [...] verizon.net>
The problem manifests on Linux (and probably Solaris); attached are a couple test data files (give them as filename argument to addLicencePage) BUT I already fixed it (not uploaded yet). - - Martin No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.463 / Virus Database: 269.6.1/777 - Release Date: 4/26/2007 3:23 PM

Message body is not shown because sender requested not to inline it.

Message body is not shown because sender requested not to inline it.

I added an explicit substitution of [\r\n]+ to \n after reading the copyright from the file. -- - - Martin 'Kingpin' Thurn