in reply to Re^3: Dynamically destroying a window in Tk?
in thread Dynamically destroying a window in Tk?

What is $windowname? Where does it come from/get created? Can you show the code that creates it? Also the result of ref($windowname) which should tell us what it is (widget or no).

I suspect it's getting unblessed somewheres..

C.

  • Comment on Re^4: Dynamically destroying a window in Tk?

Replies are listed 'Best First'.
Re^5: Dynamically destroying a window in Tk?
by Spidy (Chaplain) on Dec 07, 2004 at 23:28 UTC
    Well, here's the code...
    my $ftpinfo=MainWindow->new; my $ftpinfomenu = $ftpinfo->Menubutton(-text=>"File",-underline=>1,-me +nuitems=>[ [button=>"Clear",-command=>\&clearentries], [button=>"Save Entry",-command=>\&saveentries], [button=>"Load Entry",-command=>\&loadentry], [button=>"Close Window",-command=>sub{$ftpinfo->destroy}], ]) -pack(-side=>"right");

    However, now it's giving me an error about '-label' being a bad window path name in the Tk modules?