From: perl-win32-users-boun...@listserv.activestate.com [mailto:perl-win32-users-boun...@listserv.activestate.com] On Behalf Of Daniel Burgaud Sent: 02 September 2009 15:27 To: Perl-Win32-Users Subject: need help with Tk: I could not figure the error
> I have this test script below. > > A toplevel containing a button that invokes another toplevel. > The first time I invoke this second window, all works fine and returns properly without error. > > however, when I reenter again (clicking on "Get Number" button) I get this error message. > > Tk::Error: not a Tk object > Tk::die_with_trace at x.pl line 46 > main::AddNumber at x.pl line 66 > main::__ANON__ at C:/Perl/lib/Tk.pm line 252 > (eval) at C:/Perl/lib/Tk.pm line 252 > Tk::__ANON__ at C:/Perl/lib/Tk/Button.pm line 111 > Tk::Button::butUp at x.pl line 79 > (eval) at x.pl line 79 > main::GetNumber at x.pl line 17 > main::__ANON__ at C:/Perl/lib/Tk.pm line 252 > (eval) at C:/Perl/lib/Tk.pm line 252 > Tk::__ANON__ at C:/Perl/lib/Tk/Button.pm line 111 > Tk::Button::butUp at x.pl line 20 > (eval) at x.pl line 20 > Tk callback for .toplevel.frame.button5 > Tk::__ANON__ at C:/Perl/lib/Tk.pm line 252 > Tk::Button::butUp at C:/Perl/lib/Tk/Button.pm line 111 > <ButtonRelease-1> > (command bound to event) > > Hoping for help. > > thanks. > Dan > > > > ######################################################################## #################### > use strict; perl will give you a clue if you add "use warnings;" here. It will even give some advice if you make it "use diagnostics;". > use Tk; > ... HTH -- Brian Raven This e-mail may contain confidential and/or privileged information. If you are not the intended recipient or have received this e-mail in error, please advise the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden. _______________________________________________ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.ActiveState.com To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs