Skip Menu |

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

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

People
Owner: LGODDARD [...] cpan.org
Requestors: MTHURN [...] cpan.org
Cc: martin.thurn [...] ngc.com
AdminCc:

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



CC: martin.thurn [...] ngc.com
Subject: next_page_number is off by one
The _current_page_idx is zero-based. But the page numbers we return to the user are 1-based. The next_page_number function returns a zero-based number, so when we use it internally, all is well. But when the user calls next_page_number, it is off by one. One solution would be to have two different next_page_number functions, one for internal use and one for external use. -- - - Martin 'Kingpin' Thurn
Fixed in next release, in so doing noticed there are no tests for either this function or the 'skip' functinality. When adding new features, please add new tests!
Subject: RE: [rt.cpan.org #32490] next_page_number is off by one
Date: Tue, 22 Jan 2008 06:30:12 -0500
To: <bug-Tk-Wizard [...] rt.cpan.org>
From: "Martin Thurn" <mthurn [...] verizon.net>
122_skip.t (used to be skip.t IIRC) is the test for skip mechanism. - - Martin Show quoted text
> Fixed in next release, in so doing noticed there are no tests for > either this function or the 'skip' functinality. > > When adding new features, please add new tests! >
Subject: Re: [rt.cpan.org #32490] next_page_number is off by one
Date: Tue, 22 Jan 2008 11:41:51 +0000
To: bug-Tk-Wizard [...] rt.cpan.org
From: Lee Goddard <London [...] LeeGoddard.net>
mthurn@verizon.net via RT wrote: Show quoted text
> Queue: Tk-Wizard > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > > > 122_skip.t (used to be skip.t IIRC) is the test for skip mechanism. > > - - Martin > >
>> Fixed in next release, in so doing noticed there are no tests for >> either this function or the 'skip' functinality. >> >> When adding new features, please add new tests! >>
> > > >
I missed that because I searched for "skip" across the t/ dir and found no references other than to Test::More: 122_skip.t(2): # $Id: 22_skip.t,v 1.4 2007/06/08 00:57:01 martinthurn Exp $ 122_skip.t(18): plan skip_all => 'Test irrelevant without a display'; 122_skip.t(67): # Make sure the last page of the wizard is not set to skip: Maybe I cut something earlier on.
CC: "Thurn, Martin" <martin.thurn [...] ngc.com>
Subject: RE: [rt.cpan.org #32490] next_page_number is off by one
Date: Tue, 22 Jan 2008 06:37:58 -0600
To: <bug-Tk-Wizard [...] rt.cpan.org>
From: "Thurn, Martin" <martin.thurn [...] ngc.com>
How about Skip with a capital S? - - Martin Show quoted text
-----Original Message----- From: Lee Goddard via RT [mailto:bug-Tk-Wizard@rt.cpan.org] I missed that because I searched for "skip" across the t/ dir and found no references other than to Test::More: 122_skip.t(2): # $Id: 22_skip.t,v 1.4 2007/06/08 00:57:01 martinthurn Exp $ 122_skip.t(18): plan skip_all => 'Test irrelevant without a display'; 122_skip.t(67): # Make sure the last page of the wizard is not set to skip: Maybe I cut something earlier on.
Subject: Re: [rt.cpan.org #32490] next_page_number is off by one
Date: Tue, 22 Jan 2008 14:08:25 +0000
To: bug-Tk-Wizard [...] rt.cpan.org
From: Lee Goddard <London [...] LeeGoddard.net>
122_skip.t(2): # $Id: 22_skip.t,v 1.4 2007/06/08 00:57:01 martinthurn Exp $ 122_skip.t(18): plan skip_all => 'Test irrelevant without a display'; 122_skip.t(32): -title => "Test of Skip", 122_skip.t(46): -text => "This Wizard is a simple test of the Skip mechanism.", 122_skip.t(63): $wizard->setPageSkip($j); 122_skip.t(67): # Make sure the last page of the wizard is not set to skip: 122_skip.t(74): -text => "This Wizard is a simple test of the Skip mechanism.", Right. Still, not a great test, or interface. martin.thurn@ngc.com via RT wrote: Show quoted text
> Queue: Tk-Wizard > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > > > How about Skip with a capital S? > > > - - Martin > > -----Original Message----- > From: Lee Goddard via RT [mailto:bug-Tk-Wizard@rt.cpan.org] > > I missed that because I searched for "skip" across the t/ dir and found > no references other than to Test::More: > > 122_skip.t(2): # $Id: 22_skip.t,v 1.4 2007/06/08 00:57:01 martinthurn > Exp $ > 122_skip.t(18): plan skip_all => 'Test irrelevant without a display'; > 122_skip.t(67): # Make sure the last page of the wizard is not set to > skip: > > > Maybe I cut something earlier on. > > > > >
CC: "Thurn, Martin" <martin.thurn [...] ngc.com>
Subject: RE: [rt.cpan.org #32490] next_page_number is off by one
Date: Tue, 22 Jan 2008 08:15:39 -0600
To: <bug-Tk-Wizard [...] rt.cpan.org>
From: "Thurn, Martin" <martin.thurn [...] ngc.com>
Whatever. :-P Show quoted text
> Right. Still, not a great test, or interface.
Subject: Re: [rt.cpan.org #32490] next_page_number is off by one
Date: Wed, 23 Jan 2008 10:14:26 +0000
To: bug-Tk-Wizard [...] rt.cpan.org
From: Lee Goddard <London [...] LeeGoddard.net>
Twit. :-P martin.thurn@ngc.com via RT wrote: Show quoted text
> Queue: Tk-Wizard > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > > > Whatever. :-P >
>> Right. Still, not a great test, or interface.
> > > > > >
Pathetic "whatever"s asside, this is "fixed." Are you an American, Martin "Kingpin" Thurn?
CC: "Thurn, Martin" <martin.thurn [...] ngc.com>
Subject: RE: [rt.cpan.org #32490] next_page_number is off by one
Date: Wed, 30 Jan 2008 07:01:41 -0600
To: <bug-Tk-Wizard [...] rt.cpan.org>
From: "Thurn, Martin" <martin.thurn [...] ngc.com>
Well, you started it by insulting my code and all the hard work I put into enhancing the module. But if I've misinterpreted your comments along the way, I'm sorry. - - Martin Show quoted text
-----Original Message----- From: Lee Goddard via RT [mailto:bug-Tk-Wizard@rt.cpan.org] Sent: Tuesday, January 29, 2008 23:58 To: MTHURN@cpan.org Cc: Thurn, Martin Subject: [rt.cpan.org #32490] next_page_number is off by one <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > Pathetic "whatever"s asside, this is "fixed."
Subject: Re: [rt.cpan.org #32490] next_page_number is off by one
Date: Wed, 30 Jan 2008 17:09:58 +0000
To: bug-Tk-Wizard [...] rt.cpan.org
From: Lee Goddard <London [...] LeeGoddard.net>
Martin Please provide quotations, since I did not intend to "insult" you nor do I recall doing so. I do recall you uploading a module registered to me into your CPAN space, I do recall you deciding to reformat my perlpod-standard code into some hard-to-read code, which I find unacceptable. I tried to tell you this politely, and you became ruder than usual. There is a rule, now, which I have let you know of: if you wish to make changes to my code, do so according to perldoc perlstyle and observe any other style and coding guidelines I lay down. This seems fair and reasonable to me, and is a condition I am used to working under, and imposing on those who work with me. Lee Goddard martin.thurn@ngc.com via RT wrote: Show quoted text
> Queue: Tk-Wizard > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > > > Well, you started it by insulting my code and all the hard work I put > into enhancing the module. But if I've misinterpreted your comments > along the way, I'm sorry. > > - - Martin > > -----Original Message----- > From: Lee Goddard via RT [mailto:bug-Tk-Wizard@rt.cpan.org] > Sent: Tuesday, January 29, 2008 23:58 > To: MTHURN@cpan.org > Cc: Thurn, Martin > Subject: [rt.cpan.org #32490] next_page_number is off by one > > > <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > > > Pathetic "whatever"s asside, this is "fixed." > > > >
CC: "Thurn, Martin" <martin.thurn [...] ngc.com>
Subject: RE: [rt.cpan.org #32490] next_page_number is off by one
Date: Wed, 30 Jan 2008 12:03:56 -0600
To: <bug-Tk-Wizard [...] rt.cpan.org>
From: "Thurn, Martin" <martin.thurn [...] ngc.com>
I guess it started when you said "Still, not a great test, or interface" in this thread. Not exactly "constructive" criticism 8-) As for coding standards, yeah, sorry I don't follow the herd in that regard. One of these days maybe I'll look into an auto-reformatter or something. I guess I was looking at it as a collaborative effort, rather than it always remaining "your code". BTW I'm glad to see you back into the thick of things, Tk::Wizard-wise! - - Martin
Subject: Re: [rt.cpan.org #32490] next_page_number is off by one
Date: Wed, 30 Jan 2008 18:35:49 +0000
To: bug-Tk-Wizard [...] rt.cpan.org
From: Lee Goddard <London [...] LeeGoddard.net>
martin.thurn@ngc.com via RT wrote: Show quoted text
> Queue: Tk-Wizard > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=32490 > > > > I guess it started when you said "Still, not a great test, or > interface" in this thread. Not exactly "constructive" criticism 8-)
Well, it is not a great test or interface. Surely it is not extreme or rude to consider that an interface to functionality that skips ought to include the word "skip"? Show quoted text
> As for coding standards, yeah, sorry I don't follow the herd in that > regard.
What you call following the herd I call sensible best practice. Damian Conway wrote quite a good book on the subject, which explains why consultants, those issuing contracts, and team leads generally insist on a house style. Like Mr Wall and Mr Conway, I find perlstyle useful because it comes with perl, everyone gets it for free, it is well thought out, and leads to easy to read code. I get a bit loud on the matter, for which I apologise: it's the result of doing this for a living and regularly having to untangle illegible code which functions poorly, and often inaccurately, and often due to poor formatting. Indeed, when I look back at some of Tk::Wizard, which I began something like 10,000,000 lines of Perl ago, I shudder at some of it! Show quoted text
> One of these days maybe I'll look into an auto-reformatter or > something.
I have found the current trendy auto-reformatters are a pain to configure, but can be forced to do the job if you have the patience. Sometimes it really is useful. Show quoted text
> I guess I was looking at it as a collaborative effort, rather than it > always remaining "your code". > > BTW I'm glad to see you back into the thick of things, > Tk::Wizard-wise!
Many thanks. Please do not think your contributions are not appreciated: they are very much appreciated. I have been working 12-hour days recently and have not had much time until this past month or so to put towards bug-fixes and new features. I am considering a complete rewrite of the module logic, since it is now getting quite ungainly. An object per page would be sensible, for example. As for re-sizing and (someone else's suggestion) scrollable Wizard pages: I think re-scaling useful (I have 20% eyesight and do find inflexible interfaces tiresome), but I also like the way Wizards are small and force a kind of zazen-discipline on the coder, to limit the amount of information gathered/presented in a single step. Any thoughts on my comments on the Un-installer module? Lee
Test 122 has passed for sometime.