public inbox for sourcenav@sourceware.org
 help / color / mirror / Atom feed
From: Mo DeJong <supermo@bayarea.net>
To: sourcenav@sources.redhat.com
Subject: Re: Patch to get rid of error when closing last window
Date: Wed, 13 Feb 2002 01:51:00 -0000	[thread overview]
Message-ID: <20020212171340.51ca4b87.supermo@bayarea.net> (raw)
In-Reply-To: <20020212163929.22d85cb8.irox@redhat.com>

On Tue, 12 Feb 2002 16:39:29 -0800
Ian Roxborough <irox@redhat.com> 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}

  reply	other threads:[~2002-02-13  1:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-12 16:49 Mo DeJong
2002-02-12 17:15 ` Ian Roxborough
2002-02-13  1:51   ` Mo DeJong [this message]
2002-02-19 20:27 ` Mo DeJong
2002-02-21 20:34   ` Ian Roxborough

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020212171340.51ca4b87.supermo@bayarea.net \
    --to=supermo@bayarea.net \
    --cc=sourcenav@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).