|
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-02-27 23:44:56
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=573493 gnome-perl | Glib | Ver: unspecified Summary: suggest call-out for GObject "constructor" func Product: gnome-perl Version: unspecified Platform: Other OS/Version: Linux Status: UNCONFIRMED Severity: enhancement Priority: Normal Component: Glib AssignedTo: gtk...@li... ReportedBy: us...@zi... QAContact: gtk...@li... GNOME version: Unspecified GNOME milestone: Unspecified With Perl-Gtk 1.200 and Gtk 2.12.11 the foo.pl below gets an error GLib-GObject-CRITICAL **: g_object_set_property: assertion `G_IS_OBJECT (object)' failed at foo.pl line 12. I believe GtkFileChooserDialog dispatches chooser properties like 'action' to its child GtkFileChooserWidget, but that widget is only created by the GtkFileChooserDialog "class->constructor" func and is thus not available in a subclass INIT_INSTANCE. It'd be good to have a way to run code in the constructor() stage of a subclass. The gobject docs say this is supposed to be rarely needed, but cooperating with what a superclass like GtkFileChooserDialog does in a constructor() would be a good use. If the docs are to be believed constructor stuff normally runs bottom-up, ie. the first thing you do is call to the superclass constructor. In theory it looks like maybe you could mangle the GObjectConstructParam pspec+values going to the superclass, or something like that. So maybe an arbitrarily chainable scheme could be wanted, at least eventually. The workaround I got to for a perl subclass of GtkFileChooserDialog was to make my own new(), and set ChooserWidget properties in there. Of course subclassed new() is outside the GObject mechanism, not reached by non-Perl constructor code. For example making such a subclass with the GtkBuilder mechanism doesn't reach that new() code. -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=573493. |
|
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-02-27 23:46:41
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=573493 gnome-perl | Glib | Ver: unspecified ------- Comment #1 from Kevin Ryde 2009-02-27 23:46 UTC ------- Created an attachment (id=129695) --> (http://bugzilla.gnome.org/attachment.cgi?id=129695&action=view) failing ChooserDialog subclass program -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=573493. |
|
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-03-01 17:37:49
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=573493 gnome-perl | Glib | Ver: unspecified ------- Comment #2 from Torsten Schoenfeld 2009-03-01 12:43 UTC ------- Created an attachment (id=129778) --> (http://bugzilla.gnome.org/attachment.cgi?id=129778&action=view) GObject constructor and constructed discussion This came up about two years ago in a discussion between Emmanuele, muppet, and me. I don't recall every detail now, but I think the conclusion was that it is better to have a CONSTRUCTED that mimics GObject::constructed. I attach the mail discussion in HTML form (converted by mhonarc). Can you see a way out of this labyrinth? -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=573493. |
|
From: gnome-perl (bugzilla.gnome.org) <bug...@bu...> - 2009-03-03 00:25:46
|
If you have any questions why you received this email, please see the text at the end of this email. Replies to this email are NOT read, please see the text at the end of this email. You can add comments to this bug at: http://bugzilla.gnome.org/show_bug.cgi?id=573493 gnome-perl | Glib | Ver: unspecified ------- Comment #3 from Kevin Ryde 2009-03-03 00:26 UTC ------- Me? Nope, it's a maze of twisty passages. The construct-only properties was something I wondered about too, but don't really need. I see the bit about how a vfunc can find its superclass came up yet again. That seems like a hydra. If the C funcs have to implicitly know their superclass it might be necessary to build a new func for each subclass at runtime. Not hard to make some asm bytes, but being thread-safe, portable, and coping with normally no-exec data segments could be painful. -- See http://bugzilla.gnome.org/page.cgi?id=email.html for more info about why you received this email, why you can't respond via email, how to stop receiving emails (or reduce the number you receive), and how to contact someone if you are having problems with the system. You can add comments to this bug at http://bugzilla.gnome.org/show_bug.cgi?id=573493. |