From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28915 invoked by alias); 13 Feb 2002 01:15:03 -0000 Mailing-List: contact sourcenav-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: sourcenav-owner@sources.redhat.com Received: (qmail 28829 invoked from network); 13 Feb 2002 01:15:01 -0000 Received: from unknown (HELO shell4.bayarea.net) (209.128.82.1) by sources.redhat.com with SMTP; 13 Feb 2002 01:15:01 -0000 Received: from modrick (209-128-79-218.BAYAREA.NET [209.128.79.218]) by shell4.bayarea.net (8.9.3/8.9.3) with SMTP id RAA11884 for ; Tue, 12 Feb 2002 17:15:00 -0800 (envelope-from supermo@bayarea.net) Date: Wed, 13 Feb 2002 01:51:00 -0000 From: Mo DeJong To: sourcenav@sources.redhat.com Subject: Re: Patch to get rid of error when closing last window Message-Id: <20020212171340.51ca4b87.supermo@bayarea.net> In-Reply-To: <20020212163929.22d85cb8.irox@redhat.com> References: <20020208144412.288bb411.supermo@bayarea.net> <20020212163929.22d85cb8.irox@redhat.com> Organization: House of Mirth X-Mailer: Sylpheed version 0.4.99cvs6 (GTK+ 1.2.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SW-Source: 2002-q1/txt/msg00063.txt.bz2 On Tue, 12 Feb 2002 16:39:29 -0800 Ian Roxborough wrote: > > Thanks for the other patches, Mo. > > I'm having trouble reproducing the error, I'm > assuming the there is some dialog or window some > where that needs to be openned or something to > cause the problem error on exit, but I can't > seem to trigger it. > > Ian. All you should need to do is have a single tools window open and then close it via the window manager. The tool window must be the very last window on the screen, if you also have a symbol browser open it will not be triggered. It happens when the windows_close method in multiview.tcl sees only one window and calls file_close_project. Also, this only happens with the CVS version of itk in sources so if you are building with an older release branch it will not show up. An even more simple test case for the itk::Toplevel class is included below. Before the patch, this test will fail because the button put into the external -container window would not get deleted when the megawidget is destroyed. cheers Mo test toplevel-1.8 {when a mega-widget object is deleted, its window and any components are destroyed (even if in another window) } { itcl::class ButtonTop { inherit itk::Toplevel constructor {args} { eval itk_initialize $args itk_component add button { button $itk_option(-container).b -text Button } {} pack $itk_component(button) } itk_option define -container container Container {} } toplevel .t1 ButtonTop .t2 -container .t1 set button [.t2 component button] itcl::delete object .t2 set result [list $button [winfo exists $button]] itcl::delete class ButtonTop set result } {.t1.b 0}