Re: libglade connections
| From: | Steph Fox | Date: | Mon, 07 Nov 2005 09:54:29 +0000 |
| Subject: | Re: libglade connections | ||
| References: | 1 2 3 4 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-2066@lists.php.net to get a copy of this message | ||
Hey Andrei,
OK, I tried to think of one example when a calling object might need to be
carried as part of the signal to a _static_ function or method, and I
honestly can't. Heck, Glade 2 doesn't even allow for it, and I can't think
of anywhere GTK+ does either, and this is a wrapper around libglade _as it
exists_, not as it may be in the future.
Where the calling object's passed to the callback with the signal, it's
never a static call. How could it be? How could you have
$window->Gtk::main()? You might have a callback like
GtkContainer::do_stuff($container), but that's catered for...
If you (or anyone?) can come up with any serious examples that render those
arguments invalid, please do so and I'll revert (albeit unhappily, because I
think the existing solution's a good one). Remember, this doesn't affect
static methods belonging to classes created in user space - it's purely
about internal class methods.
- Steph
----- Original Message -----
From: "Andrei Zmievski" <andrei@gravitonic.com>
To: "Steph Fox" <steph@zend.com>
Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
Sent: Sunday, November 06, 2005 9:15 PM
Subject: Re: [PHP-GTK-DEV] libglade connections
> "640k should be enough for everybody"
>
> -Andrei
>
>
> On Nov 5, 2005, at 10:47 AM, Steph Fox wrote:
>
> > There should never be any... put it this way, there never have been.
> >
> > ----- Original Message -----
> > From: "Andrei Zmievski" <andrei@gravitonic.com>
> > To: "Steph Fox" <steph@zend.com>
> > Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
> > Sent: Saturday, November 05, 2005 6:40 PM
> > Subject: Re: [PHP-GTK-DEV] libglade connections
> >
> >
> >
> >> Bah, thanks for consulting me too.
> >>
> >> This is not as simple as it looks. Can you guarantee that any
> >> internal class method that .glade file may wish to connect to will
> >> need only simple connection? What if there are methods that actually
> >> need to have the signal widget?
> >>
> >> -Andrei
> >>
> >>
> >> On Nov 5, 2005, at 10:22 AM, Steph Fox wrote:
> >>
> >>
> >>> Thanks to the irc gang (Rob, Wez, Derick), the need for a tag just
> >>> left the
> >>> building.
> >>>
> >>> All systems go :)
> >>>
> >>> ----- Original Message -----
> >>> From: "Steph Fox" <steph@zend.com>
> >>> To: "Andrei" <andrei@gravitonic.com>
> >>> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
> >>> Sent: Saturday, November 05, 2005 4:08 PM
> >>> Subject: Fw: [PHP-GTK-DEV] libglade connections
> >>>
> >>>
> >>>
> >>>
> >>>> ps signal_autoconnect_instance() is brilliant :)
> >>>>
> >>>> The only remaining problem's having to tag those statics, we
> >>>> shouldn't
> >>>>
> >>>>
> >>> need
> >>>
> >>>
> >>>> to do that.
> >>>>
> >>>> ----- Original Message -----
> >>>> From: "Steph Fox" <steph@zend.com>
> >>>> To: "Andrei" <andrei@gravitonic.com>
> >>>> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
> >>>> Sent: Saturday, November 05, 2005 3:59 PM
> >>>> Subject: Fw: [PHP-GTK-DEV] libglade connections
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>> OK, crash gorn.
> >>>>>
> >>>>> Statics still weird. I don't get the '-' reference...
> >>>>>
> >>>>> ----- Original Message -----
> >>>>> From: "Steph Fox" <steph@zend.com>
> >>>>> To: "Andrei" <andrei@gravitonic.com>
> >>>>> Cc: "PHP-GTK dev" <php-gtk-dev@lists.php.net>
> >>>>> Sent: Saturday, November 05, 2005 3:25 PM
> >>>>> Subject: [PHP-GTK-DEV] libglade connections
> >>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Andrei,
> >>>>>>
> >>>>>> I just tested some of the changes using a bog-standard
> >>>>>> no-clever-object-business test script. signal_autoconnect()
> >>>>>> works for
> >>>>>> everything except static calls (i.e. gtk::main_quit doesn't work
> >>>>>> any
> >>>>>>
> >>>>>>
> >>>>> more),
> >>>>>
> >>>>>
> >>>>>> no leaks, congrats (but can we have our static support back
> >>>>>> please? -
> >>>>>>
> >>>>>>
> >>>>> since
> >>>>>
> >>>>>
> >>>>>> Glade actually encourages it. At present it's seen as a straight
> >>>>>> connect() - it needs to go as connect_simple()).
> >>>>>>
> >>>>>> signal_connect() crashes whatever you try to do to it, haven't
> >>>>>>
> >>>>>>
> >>>>> investigated
> >>>>>
> >>>>>
> >>>>>> why yet.
> >>>>>>
> >>>>>> Mind if I play?
> >>>>>>
> >>>>>> - Steph
> >>>>>>
> >>>>>> --
> >>>>>> PHP-GTK Development Mailing List (http://gtk.php.net/)
> >>>>>> To unsubscribe, visit:
> >>>>>> http://www.php.net/unsub.php
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>
> >>>>> --
> >>>>> PHP-GTK Development Mailing List (http://gtk.php.net/)
> >>>>> To unsubscribe, visit:
> >>>>> http://www.php.net/unsub.php
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>> --
> >>>> PHP-GTK Development Mailing List (http://gtk.php.net/)
> >>>> To unsubscribe, visit: �GÛA‹ðWŽÞ
> >>>> ”gn¥êhttp://www.php.net/unsub.php
> >>>>
> >>>>
> >>>
> >>>
> >>
> >>
> >
> > --
> > PHP-GTK Development Mailing List (http://gtk.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>