Skip Menu |

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

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

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

Bug Information
Severity: Wishlist
Broken in: 2.111
Fixed in: (no value)



Subject: callback_dirselect is hard to use
Wizard.pm contains a useful callback for the dirSelect page, but it's hard to use. The only way I know how is to supply a preNextButtonAction which looks at the current page number, and if we're on the dirSelect page, call the dirselect callback. It would be nice if there were a more convenient way, such as the ability to install callbacks on a per-page basis. -- - - Martin 'Kingpin' Thurn
Cuold you please explain the problems you find in using it? Since there is already support for pre- and post-button callbacks, I'm not sure what other callbacks you would like: could you please provide a use case? Thanks Lee
On Thu Dec 20 09:30:53 2007, LGODDARD wrote: Show quoted text
> Cuold you please explain the problems you find in using it?
The only way to set a callback is on the Wizard object. That means the same callback gets called for EVERY page. But of course we want the dirselect callback to be called only for a dirselect page, not any other pages. And in general, as the user flips from page to page, we only want to do checking for the things that happened on that page. If the same callback gets called for every page, the logic in that mother-of-all-callbacks gets very convoluted -- at best, it ends up looking like a big cascaded IF statement that uses the current (and/or next) page number to decide what to do... These are reasons that per-page callbacks make sense. -- - - Martin 'Kingpin' Thurn
I'm adding it now.
Added feature.