Interfaces, shminterfaces..

From: Date: Tue, 22 Mar 2005 00:18:49 +0000
Subject: Interfaces, shminterfaces..
Groups: php.gtk.dev 
Request: Send a blank email to php-gtk-dev+get-1040@lists.php.net to get a copy of this message
After a head-slapping moment [0], I have support for classes and interfaces, so this should work. $m = new GtkFileChooserDialog("Open", null, Gtk::FILE_CHOOSER_ACTION_OPEN,
                              array(Gtk::STOCK_CANCEL, Gtk::RESPONSE_CANCEL,
                                    Gtk::STOCK_OK, Gtk::RESPONSE_OK));
printf("response: %d\n", $m->run()); printf("filename: %s\n", $m->get_filename()); $m->destroy(); -Andrei [0] The head-slapping moment was when I realized that I was futilely trying to make interfaces that had method implementations. Interface are pure APIs, doh, it's just that Gtk+ provides proxy functions to convert an object to interface and invoke its implementation.

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