]> git.draconx.ca Git - gob-dx.git/blobdiff - examples/my-person.gob
Release 1.99.1
[gob-dx.git] / examples / my-person.gob
index 06a0aaaa5608534fd186b1803167632e47df0c90..d895a629562f12c40b0c9a3b4625f13dfdc8ad5e 100644 (file)
@@ -16,14 +16,14 @@ class My:Person from Gtk:Object {
        public long dod; /* date of death as a time_t */
 
        private int rounds_in_shotgun; /* number of rounds in our shotgun */
-
+       
        argument POINTER (type char *) name
        get {
-               /* note that strdup handles NULL correctly */
+               /* note that g_strdup handles NULL correctly */
                ARG = g_strdup(self->name);
        }
        set {
-               /* note that strdup handles NULL correctly */
+               /* note that g_free and g_strdup handles NULL correctly */
                g_free(self->name);
                self->name = g_strdup(ARG);
        };
@@ -91,4 +91,10 @@ class My:Person from Gtk:Object {
                g_free(MY_PERSON(self)->name);
                PARENT_HANDLER(self);
        }
+
+       public GtkObject *
+       new(void)
+       {
+               return (GtkObject *)GET_NEW;
+       }
 }