~ubuntu-branches/ubuntu/natty/perl-tk/natty

« back to all changes in this revision

Viewing changes to pod/Error.pod

  • Committer: Bazaar Package Importer
  • Author(s): Stephen Zander
  • Date: 2004-03-14 13:54:44 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040314135444-prc09u2or4dbr3to
Tags: 1:800.025-2
Add xlibs-dev to Build-Depends:,
Closes: #237942

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
The B<Tk> module includes a default B<Tk::Error> subroutine
78
78
that simply reports the error on stderr.
79
79
 
80
 
An alternate definition is provided via :
 
80
=head1 Tk::ErrorDialog
 
81
 
 
82
An alternate definition is provided via:
81
83
 
82
84
S<    >C<require Tk::ErrorDialog;>
83
85
 
85
87
the user a chance to see a stack trace showing where the
86
88
error occurred.
87
89
 
 
90
This is an OO implementation of the Tcl/Tk command B<bgerror>, with a
 
91
twist: since there is only one B<ErrorDialog> widget, you aren't required
 
92
to invoke the constructor to create it; it will be created
 
93
automatically when the first background error occurs.  However, in
 
94
order to configure the I<-cleanupcode> and I<-appendtraceback>
 
95
B<ErrorDialog> options you must call the constructor and create it
 
96
manually.
 
97
 
 
98
The B<ErrorDialog> object essentially consists of two subwidgets: a
 
99
B<Dialog> widget to display the background error and a B<Text> widget
 
100
for the traceback information.  If required, you can invoke various
 
101
widget methods to customize these subwidgets - their advertised names
 
102
are described below.
 
103
 
 
104
S<    >I<$mw>-E<gt>B<ErrorDialog>(-cleanupcode => I<code>, -appendtraceback => I<bool>);
 
105
 
 
106
$mw is a window reference.
 
107
 
 
108
I<code> is a CODE reference if special post-background error
 
109
processing is required (default is undefined). The callback subroutine
 
110
is called with @_ having the same arguments that B<Tk::Error> was
 
111
invoked with.
 
112
 
 
113
I<bool> is a boolean indicating whether or not to append successive
 
114
tracebacks (default is 1, do append).
 
115
 
 
116
=head2 Advertised ErrorDialog widgets
 
117
 
 
118
I<error_dialog> is the Dialog widget reference.
 
119
 
 
120
I<text> is the Text widget reference containing the traceback information.
 
121
 
88
122
=head1 BUGS
89
123
 
90
124
If B<after> or B<fileevent> are not invoked as methods of a widget