Fw: [PHP-GTK-DEV] Re: [PHP-GTK] ext/libglade complete?

From: Date: Sun, 30 Oct 2005 21:19:11 +0000
Subject: Fw: [PHP-GTK-DEV] Re: [PHP-GTK] ext/libglade complete?
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-2013@lists.php.net to get a copy of this message
> > Is there precedence for 'MyApp::callback' syntax? If you are not > > happy about having a separate signal_autoconnect_object() method, it > > wouldn't be that hard to modify signal_autoconnect() to check whether > > it got an object instance as the first parameter, and if so, hook up > > the callbacks to it. > > I prefer to have a separate function because it's cleaner. > > Yes, I'm thinking that way now too. Erm, wait, I just realized what you meant by that. No, it's not cleaner, because of the way Glade works. In PHP-GTK 1, if you set up the object to be passed in Glade it never worked, because signal_autoconnect() didn't recognise it. This way, it does work, and signal_autoconnect() caters for four separate kinds of signals. Its only problems are a) passing data and b) connecting to a callback defined within a class, non-statically. I think it would be sensible to have a separate function that passed an object as first parameter if you wanted to be able to access callbacks within that class, and data mapping as a second parameter. I don't think it would be a good idea to call it signal_autoconnect_object() though, because that means something other. - Steph

« previous php.gtk.dev (#2013) next »