RE: Closing a window in GTK--
- From: Angel Jimenez Jimenez <ajimenez vnet es>
- To: gtk-list redhat com
- Subject: RE: Closing a window in GTK--
- Date: Fri, 15 May 1998 23:12:48 +0000
Lachac, Gerry wrote:
> I use the same technique and same versions of software. I don't have a
> problem with this. In other words, it should work.
Does automatic hide() work for you? I still have to explicitly hide()
windows before deleting...
> When you do the hide() explicitedly, does the window disappear? If it
> doesn't I would suspect that the pointer you are using is corrupt, ie not
> the window pointer.
There's no problem with hide(). When I call it the window always
disappear.
> Trying putting a printf in the destructor for your destructor for the window
> to see if it was called when the delete is issued.
I did, and it was called.
I think I have found the problem. It was not the destructor, but the
constructor what was failing. As "autohiding" is not working, and I
wasn't calling it, I thought the problem was in the destructor. Calling
hide() before delete, the destructor seems to work. But the next time I
try to open a window it gives me a sissegv.
It seems the problem was the way I was creating menus with menufactory.
I had 2 instances (instead of pointers to instances) of Gtk_MenuFactory,
as in the example from the tutorial. Changing them to pointers has
solved the problem.
Thanks.
Angel.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]