Re: Constructor semantics
| From: | Andrei Zmievski | Date: | Thu, 11 Nov 2004 07:22:49 +0000 |
| Subject: | Re: Constructor semantics | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-773@lists.php.net to get a copy of this message | ||
On Thu, 11 Nov 2004, Christian Weiske wrote:
> I see only one problem: What if a constructor really needs only an array
> of, lets say titles as first parameter? How to distinguish between
> normal an option-based invocation?
The property-based constructors are meant only for simple values. A
constructor such as GtkClist one will surely be overriden by a custom
implementation.
> If that would be no problem, then I think it is a nice-to-have.
If it's just nice-to-have, I am not sure I want to invest time it right
now. I'll just go ahead and implement positional parameters first.
> That would be the oo way. Java does the same AFAIK. +1 from me.
> Just now there is the problem that old program would run even if one
> assignment failed, here you'd need to catch the exceptions or the prog dies.
Right. Before we had warnings, but I think failure to create an object
is serious enough.
> PS: Andrei, just something for the
> "the-doc-people-would-like-to-have-it" list:
> It would help very very very much if there would be a glade function
> which connects all signals defined in the glade to functions of an
> OBJECT. In php-gtk1 there are only functions which connect the signals
> assigned to functions in the glade file to objectless functions - that's
> not very oo.
Sure, I'll see what's possible, but that's after main stuff is
implemented in PHP-GTK 2.
-Andrei
* Think digital, act analog. *