GtkPlug and Socket
| From: | Anant Narayanan | Date: | Mon, 20 Mar 2006 00:08:05 +0000 |
| Subject: | GtkPlug and Socket | ||
| Groups: | php.gtk.dev | ||
| Request: | Send a blank email to php-gtk-dev+get-2657@lists.php.net to get a copy of this message | ||
Hello All (esp. Andrei),
I meekly submit my first overrides ever: GtkPlug::get_id(),
GtkSocket::get_id(), add_id(). Please forgive me if they are total crap.
I also wrote the override for GtkPlug's constructor, but before
submitting it, I would like to ask which behavior should be preferred by
default:
Case 1 - GtkPlug takes no arguments:
$socket = new GtkSocket();
$plug = new GtkPlug();
$id = $plug->get_id();
$socket->add_id($id);
OR
Case 2 - GtkPlug takes the socket's ID as parameter:
$socket = new GtkSocket();
$id = $socket->get_id();
$plug = new GtkPlug($id);
I personally prefer the second method; although in an ideal situation we
should allow both the ways.
Best Regards,
--
Anant
Find Freedom, Go Open Source!
http://www.kix.in/