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]>
> What's the difference between get_pg2object() as used in the generated
> code, and get_gobject() as used in Pawel's version?

get_pg2object() only allows objects that inherit the specified class,
and returns a pointer to the gobject.

| GObject *get_pg2object(struct object *from, struct program *type)
| {
|   struct object_wrapper * o;
|   if (!from)
|     return NULL;
|   o=get_storage(from,type);
|   if (!o)
|     return 0;
|   return o->obj;
| }


get_gobject() is a macro for get_pg2object(o,pg2_object_program)
So it is enough that you inherit G.object.

| #define get_gobject(from) get_pg2object(from,pg2_object_program)

-- 
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.