Re: GTK2.TreeView()->set_model() does not work as expected

"Per Hedbor () @ Pike (-) importm?te f?r mailinglistan" <[email protected]>
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
> Yes, when I created that declaration, I wasn't doing anything
> special.  It is possible also that with the updated gtk2 versions
> since the function was first introduced, that something had changed
> that required updated code.

It really should not, actually.
The generated code is more or less identical to the newly commited
'fixed' version.

I am somewhat uncertain about the '+' in GTK2.TreeView in the
declaration, incidentally, it says that a gtk2 reference should be
added to the return type.

Anyway, the generated code looks like this:

| void pgtk2_tree_view_set_model( INT32 args )
| {
|   GtkTreeModel *a0;
|   if( args < 1 )
|     Pike_error(/* "Too few arguments, %d required, got %d\n" */
|                 (PSTR+0x2e),
|                1, args);
| 
|   if( TYPEOF(Pike_sp[ 0 - args ]) != PIKE_T_OBJECT )
|     a0 = NULL;
|   else
|     a0 = GTK_TREE_MODEL(get_pg2object(Pike_sp[0-args].u.object, pgtk2_tree_model_program));
|   pgtk2_verify_inited();
|   gtk_tree_view_set_model( GTK_TREE_VIEW(THIS->obj), GTK_TREE_MODEL(a0) );
|   RETURN_THIS();
| }


which really should be rather identical to the newly 'implemented'
version.

-- 
Per Hedbor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.