Re: gtk_tree_path_new_from_indices and gtk_tree_row_reference_new



On Thu, 21 Aug 2003 11:05:12 -0400 (EDT), muppet wrote:

[I already sent the forgotten patches, but they don't seem to have made
 it to the list yet.]

The first one implements gtk_tree_path_new_from_indices. The comment
that's currently there states that we should do the same that C does
and stop whenever we find a -1. I can't quite comprehend why this
would be necessary, since a) it's quite un-perl-ish and b) with XS'
"items" we have all we need to process the variable argument list.

i didn't know beans about the TreeView stuff when i started work on
the bindings; that comment is basically me taking notes on what the
documentation says is supposed to in C so i could figure out how to
map it to perl.  indeed, it should use the contents of the arg stack
instead of a sentinel value, but the C stuff looks for a sentinel
value so the XS wrapper will have to add one.

also, since the C stuff will stop when it sees a -1, there's no point
in us passing the rest of the stuff after a -1, hence, 'we should stop
at -1 since that's what the C stuff will do anyway.'

Ah, I see. If you look at the patch you'll see that the wrapper actually
is no wrapper as it doesn't call gtk_tree_path_new_from_indices but
imitates what the C function does internally. The -1 problem persists,
though.

I also don't understand the FIXME comment since all
this function returns is a single GtkTreePath.

there were other spots at which the C functions return NULL-terminated
arrays of objects; since i was unfamiliar with the Tree stuff, i was
unsure about this return.

that, and i was running 2.0.6 and had no way to test the 2.2.x code. 
;-)

I see. Sincere condolences.

Bye,
-Torsten



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