Re: [gtk-list] Unsolvable bug ...
- From: Daniel Burrows <Daniel_Burrows brown edu>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Unsolvable bug ...
- Date: Thu, 25 Feb 1999 15:14:21 -0500
On Wed, Feb 24, 1999 at 11:14:23PM +0100, Maki Todoriki was heard to say:
> Hello,
>
> I have a bug I can't solve. My program crash desperately.
>
> I have tried to re-think the approach, and the code, but ...
>
> I just had an idea, maybe what I want to do is basically wrong : I want
> to modify the content of a part of a windows.
>
> It's a search area, so the user can define the fields,.... then click on
> the search button. At this time I do a gtk_widget_destroy of a vbox
> inside the window, and put the result of the research instead.
>
> But I want my user to be able to refine the search, so once again I
> destroy the box and put the search widget inside.
>
I know someone who had a similar problem; I believe that one option is
to keep the widgets created but store them somewhere else in your program.
Then just do gtk_container_remove() on the one and gtk_container_add() on
the other (or table_attach..whatever..)
The one subtlety is that you have to keep it from destroying the old
widget. I think there's a call, gtk_object_reference(), or gtk_reference(),
that just increments the reference count of an object (so that it doesn't
get zapped). You'll want to make sure you dereference it before destroying
it for good, though. :-)
Daniel Burrows
--
Fate always wins...at least, when people stick to the rules.
-- Terry Pratchett, _Interesting Times_
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]