Re: Classes Documentation

From: Date: Thu, 15 Dec 2005 07:15:01 +0000
Subject: Re: Classes Documentation
References: 1  Groups: php.gtk.doc 
Request: Send a blank email to php-gtk-doc+get-1702@lists.php.net to get a copy of this message
Hello Anant, > As Jp had pointed out earlier, many Gtk Classes have arguments missing > in their constructors and methods. For example, the > GtkFileChooserDialog actually accepts 5 arguments, but none have been > mentioned in the class definition. That is because the base manual has been auto-generated from the php-gtk2 sources at the beginning of this year. Many things have changed now, and we haven't found a way yet to automatically update the xml files from the sources - and I doubt that this is happening in the future. > seems like, we have to test every class for it's structure. Yep. > Is there > any definitive way to find out how many arguments a particular > construcutor/method will accept? Or we just find out with trial and > error? You could - use Dev_Inspector which you can find in the "Channel" on gnope.org to see, which parameters are officially supported and what functions are there. - Dig in the php-gtk sources and see, what parameters are defined there. The Dev_Inspector way is the easier one, and will show you the same information. > Should I add these arguments manually to every constructor/methods > definition wherever they may be missing? Arguments are significantly > different from those we give in native Gtk. Yes! Gtk and PHP have different concepts; one is that Gtk is still C code, and isn't object oriented a bit: You do things like > gtk_entry_set_label($labelwidget, 'my text'); instead of > $labelwidget->set_label('my text'); They also use things like > $color = new GdkColor(); > make_my_color_red($color); > //color is red now instead of > $color = get_red_color() So many things have to be converted to match the "PHP style of doing", and parameter changes happen that way. -- Regards/MfG, Christian Weiske

Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
« previous php.gtk.doc (#1702) next »