hi,
I known but when you override init method instance assuming self and o
when not override and only in this case. I supposed self is better
choice.
Regards,
Le samedi 23 juillet 2005 à 18:31 +0200, Jean-Yves Lefort a écrit :
> On Sat, 23 Jul 2005 17:01:00 +0200
> Nicolas Bruguier <gandalfn_at_club-internet.fr> wrote:
>
> > I'm a stupid boy
> >
> > here new patch,
>
> I think you should respect the instance name given in the .gob file
> rather than assuming "self".
>
> > Le samedi 23 juillet 2005 à 16:37 +0200, Jean-Yves Lefort a écrit :
> > > On Sat, 23 Jul 2005 12:39:00 +0200
> > > Nicolas Bruguier <gandalfn_at_club-internet.fr> wrote:
> > >
> > > > oups! with syntax change it miss a condition in the function
> > > > print_initializer
> > > >
> > > > here the corrective patch
> > >
> > > It's still broken:
> > >
> > > [...]
> > > #line 6 "test.gob"
> > > static void
> > > test_window_init (TestWindow * self G_GNUC_UNUSED)
> > > #line 149 "test-window.c"
> > > {
> > > #define __GOB_FUNCTION__ "Test:Window::init"
> > > self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,TEST_TYPE_WINDOW,TestWindowPrivate);
> > > {
> > > GtkWidget * root;
> > > o->_priv->_glade_xml = glade_xml_new("test.glade", "root", NULL);
> > > root = glade_xml_get_widget(o->_priv->_glade_xml, "root");
> > > gtk_widget_show(root);
> > > gtk_container_add(GTK_CONTAINER(o), root);
> > > glade_xml_signal_autoconnect_full(o->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)o);
> > > }
> > > self->_priv->a = (GtkWidget * )glade_xml_get_widget(self->_priv->_glade_xml, "a");
> > > self->_priv->b = (GtkWidget * )glade_xml_get_widget(self->_priv->_glade_xml, "b");
> > > }
> > > #undef __GOB_FUNCTION__
> > > [...]
> > >
> > > > Le samedi 23 juillet 2005 à 01:23 +0200, Jean-Yves Lefort a écrit :
> > > > > On Fri, 22 Jul 2005 13:21:22 -0700
> > > > > George <jirka_at_5z.com> wrote:
> > > > >
> > > > > > Here are the news in 2.0.12:
> > > > > >
> > > > > > * libglade support (see manpage) (Nicolas Brugier)
> > > > >
> > > > > It's broken.
> > > > >
> > > > > === input
> > > > > class Test:Window from Gtk:Window (GladeXML "test.glade" "root")
> > > > > {
> > > > > private Gtk:Widget *a GladeXML;
> > > > > private Gtk:Widget *b GladeXML;
> > > > >
> > > > > init (self)
> > > > > {
> > > > > }
> > > > > }
> > > > > ===
> > > > >
> > > > > === output
> > > > > [...]
> > > > > #line 6 "test.gob"
> > > > > static void
> > > > > test_window_init (TestWindow * self G_GNUC_UNUSED)
> > > > > #line 149 "test-window.c"
> > > > > {
> > > > > #define __GOB_FUNCTION__ "Test:Window::init"
> > > > > self->_priv = G_TYPE_INSTANCE_GET_PRIVATE(self,TEST_TYPE_WINDOW,TestWindowPrivate);
> > > > > {
> > > > > GtkWidget * root;
> > > > > o->_priv->_glade_xml = glade_xml_new("test.glade", "root", NULL);
> > > > > root = glade_xml_get_widget(o->_priv->_glade_xml, "root");
> > > > > gtk_widget_show(root);
> > > > > gtk_container_add(GTK_CONTAINER(o), root);
> > > > > glade_xml_signal_autoconnect_full(o->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)o);
> > > > > }
> > > > > self->_priv->a = {
> > > > > GtkWidget * root;
> > > > > o->_priv->_glade_xml = glade_xml_new("test.glade", "root", NULL);
> > > > > root = glade_xml_get_widget(o->_priv->_glade_xml, "root");
> > > > > gtk_widget_show(root);
> > > > > gtk_container_add(GTK_CONTAINER(o), root);
> > > > > glade_xml_signal_autoconnect_full(o->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)o);
> > > > > }
> > > > > ;
> > > > > self->_priv->b = {
> > > > > GtkWidget * root;
> > > > > o->_priv->_glade_xml = glade_xml_new("test.glade", "root", NULL);
> > > > > root = glade_xml_get_widget(o->_priv->_glade_xml, "root");
> > > > > gtk_widget_show(root);
> > > > > gtk_container_add(GTK_CONTAINER(o), root);
> > > > > glade_xml_signal_autoconnect_full(o->_priv->_glade_xml, (GladeXMLConnectFunc)___glade_xml_connect_foreach, (gpointer)o);
> > > > > }
> > > > > ;
> > > > > self->_priv->a = (GtkWidget * )glade_xml_get_widget(self->_priv->_glade_xml, "a");
> > > > > self->_priv->b = (GtkWidget * )glade_xml_get_widget(self->_priv->_glade_xml, "b");
> > > > > }
> > > > > #undef __GOB_FUNCTION__
> > > > > [...]
> > > > > ===
>
Received on Sat Jul 23 2005 - 16:59:17 CDT
This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT