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

Alright, I've messed around with it a bit, and managed to get it down to this:
MainWindow=HASH(0x164a81c) is not a widget at *.pl line **.


Any more ideas?

Replies are listed 'Best First'.
Re^4: Dynamically destroying a window in Tk?
by castaway (Parson) on Dec 07, 2004 at 08:17 UTC
    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.

      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?