Re: Extending PHP1 GTK Widget class with PHP?
| From: | Markus Fischer | Date: | Tue, 06 Jun 2006 14:59:04 +0000 |
| Subject: | Re: Extending PHP1 GTK Widget class with PHP? | ||
| References: | 1 2 | Groups: | php.gtk.general php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-6990@lists.php.net to get a copy of this message | ||
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Additionally, your derived class will have problems with properties
being references to other GTK widgets (you will end up with copies
instead of references) and can be very *very* time intensive to track
down this problem. Afaik this doesn't apply to PHP-GTK2 anymore.
- - Markus
Malk0 wrote:
> you can do
>
> function SuperTree(){
> parent::SuperTree();
> }
>
> this would work, by the way depending on what you really want to
> achieve it can be more suitable to create an object that contain an
> instance of a gtkwidget like this
>
> class SuperTree{
> function SuperTree(){
> $this->ctree = &new gtkctree();
> }
> }
>
> this second manner will allow you to have other widget embedded in the
> SuperTree class, not the first one.
> hope this help,
> nathan
>
> On 6/6/06, Benjamin Smith <lists@benjamindsmith.com> wrote:
>> Is it possible to extend a Gtk Widget in PHP4/GTK1?
>>
>> EG:
>>
>> Class SuperTree Extends GtkCTree(
>>
>> Function SuperTree()
>> {
>> // HOW WOULD I INSTANTIATE THE GtkWidget?
>> }
>> ) // end class SuperTree
>>
>> -Ben
>> --
>> "The best way to predict the future is to invent it."
>> - XEROX PARC slogan, circa 1978
>>
>> --
>> PHP-GTK General Mailing List (http://gtk.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFEhZg41nS0RcInK9ARAoB3AKCA/ic+6OAP8qqeY+u709VXynz8FgCeM1F6
ALH5tcChChwZxmURYDkx/yQ=
=1l/r
-----END PGP SIGNATURE-----