X-Git-Url: https://git.draconx.ca/gitweb/gob-dx.git/blobdiff_plain/f31590988781d77ff5249987801d03a986368ca2..b17287deb56775a49030d738d8c8c0e9cd15f9fe:/examples/my-person.gob diff --git a/examples/my-person.gob b/examples/my-person.gob index abf1d01..f09b151 100644 --- a/examples/my-person.gob +++ b/examples/my-person.gob @@ -1,3 +1,5 @@ +require 0.92.1 + %{ #include #include "my-person.h" @@ -11,7 +13,7 @@ class My:Person from Gtk:Object { private int rounds_in_shotgun; /* number of rounds in our shotgun */ - argument POINTER name + argument POINTER (type char *) name get { if(self->name) ARG = g_strdup(self->name); @@ -29,14 +31,14 @@ class My:Person from Gtk:Object { argument LONG dob get { ARG = self->dob; } set { self->dob = ARG; }; argument LONG dod get { ARG = self->dod; } set { self->dod = ARG; }; - init(person) + init(self) { - person->name = g_strdup("Nobody"); - person->dob = 0; - person->dod = 0; + self->name = g_strdup("Nobody"); + self->dob = 0; + self->dod = 0; /* initially we have no rounds in the shotgun */ - person->_priv->rounds_in_shotgun = 0; + self->_priv->rounds_in_shotgun = 0; } /* when the person gets born, sends out a signal, the caller