[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: gtktreeview.c assertion failed
- From: "muppet" <scott asofyet org>
- To: gtk-perl-list gnome org
- Subject: Re: gtktreeview.c assertion failed
- Date: Mon, 22 Oct 2007 11:21:44 -0400 (EDT)
Dave Howorth wrote:
> So I started simplifying my Perl program and made the problem go away :)
> It disappeared when I removed this line from inside a callback:
>
> Gtk2->main_iteration while Gtk2->events_pending;
>
> The line was there (buried inside method calls) through historical
> accident and the program still works without it, which is good news.
>
> I'm curious whether this is something that is forbidden or should work
> though? I couldn't see anything relevant in a quick scan of the gtk and
> glib docs, except for statements that main loops can be nested.
It's not forbidden, but is undesirable. What that line does is drain the
event queue, as though you'd run a recursive main loop. This normally
shouldn't be a problem, but can make your program messy in that you can have
events occur when you don't expect them.
For example, since you mention this, i expect that you wound up consuming the
drop event with the events-pending loop before returning to the scope that was
expecting to get that event.
--
muppet <scott at asofyet dot org>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]