Re: problems with Gtk2::ListStore



On Mon, 2003-04-28 at 19:47, Chas Owens wrote:
That means it has to be something weird I am doing earlier in the code.

no, actually, it's a bizarre side-effect-induced bug having to do with
reading the stack from a helper function called from an xsub which has
already pushed a mark onto the stack.  there's a strange interaction
(which i don't understand) which causes the number of items on the stack
to be completely wrong in the helper function, *but* *only* *sometimes*.

i was using a helper function to share between Gtk2::TreeStore->new and
Gtk2::TreeModel->new the code that gets the type array off the stack. 
your particular program managed to trick the helper function into seeing
*three* items on the stack when in fact there were only two. so it
created the ListStore with two columns --- a Gtk2::ListStore column and
a G::String column.

thus, when you tried to set column 0 to a string, the bindings
complained because you were trying to set a string into a column that
wanted a Gtk2::ListStore pointer.

freaky, freaky, freaky.


the workaround in the code is to avoid the use of the helper function.

i just committed the fix to both Gtk2::TreeStore and Gtk2::ListStore.


-- 
muppet <scott at asofyet dot org>




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]