Date: Tue, 14 Oct 2003 10:48:22 +0100 To: lablgtk at kaba.or.jp Subject: Re: Bug when changing the contents of a frame Message-ID: <20031014094822.GA7165 at redhat.com> References: <20031013133019.GA26162 at redhat.com> <16266.45995.39355.140798 at akasha.ijm.jussieu.fr> <20031013142456.GC26162 at redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031013142456.GC26162 at redhat.com> From: Richard Jones On Mon, Oct 13, 2003 at 03:24:56PM +0100, Richard Jones wrote: > Hmmmm ... that was a bug in my minimal example. The real program is of > course much larger, so I'll need to go back and see if I can reproduce > it now :-) I take it back. I've worked out what was causing the bug, and it was, of course, a bug in my own program. What I was doing was calling next_button#connect#clicked ~callback:(...); prev_button#connect#clicked ~callback:(...); where (...) was the code to remove the old widget & create a new one. I was calling these each time a page was shown, not realising that connecting events doesn't remove the old callbacks. So an old callback was being called, referring to a long-dead widget. Rich. -- Richard Jones. http://www.annexia.org/ http://freshmeat.net/users/rwmj Merjis Ltd. http://www.merjis.com/ - all your business data are belong to you. "One serious obstacle to the adoption of good programming languages is the notion that everything has to be sacrificed for speed. In computer languages as in life, speed kills." -- Mike Vanier