NAME
Tk::Wizard::Tasks - Tk::Wizard
pages to perform sequential tasks
SYNOPSIS
Currently automatically loaded by Tk::Wizard
, though this behaviour is deprecated and is expected to change in 2008.
DESCRIPTION
Adds a number of methods to Tk::Wizard
, to allow the end-user to access the filesystem.
METHODS
addTaskListPage
Adds a page to the Wizard that will perform a series of tasks, keeping the user informed by ticking-off a list as each task is accomplished.
Whilst the task list is being executed, both the Back and Next buttons are disabled.
Parameters are as for "blank_frame", plus:
- -tasks
-
The tasks to perform, supplied as a reference to an array, where each entry is a pair (i.e. a two-member list), the first of which is a text string to display, the second a reference to code to execute.
- -delay
-
The length of the delay, in milliseconds, after the page has been displayed and before execution the task list is begun. Default is 1000 milliseconds (1 second). See Tk::after.
- -continue
-
Display the next Wizard page once the job is done: invokes the callback of the Next button at the end of the task.
- -todo_photo
- -doing_photo
- -ok_photo
- -error_photo
- -na_photo
-
Optional: all Tk::Photo objects, displayed as appropriate.
-na_photo
is displayed if the task code reference returns an undef value, otherwise:-ok_photo
is displayed if the task code reference returns a true value, otherwise:-error_photo
is displayed. These have defaults taken from Tk::Wizard::Image. - -label_frame_title
-
The label above the Tk::LabFrame object which contains the task list. Default label is the boring
Performing Tasks:
. - -frame_args
-
Optional: the arguments to pass in the creation of the
Frame
object used to contain the list. - -frame_pack
-
Optional: array-refernce to pass to the
pack
method of theFrame
containing the list.
TASK LIST EXAMPLE
$wizard->addTaskListPage(
-title => "Toy example",
-tasks => [
"Wait five seconds" => sub { sleep 5; 1; },
"Wait ten seconds!" => sub { sleep 10; 1; },
],
);
AUTHOR
Lee Goddard (lgoddard@cpan.org).
COPYRIGHT
Copyright (C) Lee Goddard, 11/2002 - 01/2008 ff.
Made available under the same terms as Perl itself.