Re: More Updates...
| From: | Christian Weiske | Date: | Fri, 02 Dec 2005 21:51:34 +0000 |
| Subject: | Re: More Updates... | ||
| References: | 1 | Groups: | php.gtk.doc |
| Request: | Send a blank email to php-gtk-doc+get-1682@lists.php.net to get a copy of this message | ||
Hello Anant,
> http://www.kix.in/20051125.tar
Thanks for the docs. Some notes:
- Don't just copy the gtk2 docs; sometimes the functions are a bit
different: While gtk2 is C (not object oriented), PHP-Gtk2 is highly OO
- with the impact that you don't do
> funcname($widget, $firstparam, $secondparam)
as in C but
> $widget->funcname($firstparam, $secondparam)
So a
> Sets the previous value on alpha on the specified
> <classname>GtkColorSelection</classname> widget.
is a bit overspecified, as we don't specify our widget in php-gtk2 as
you have to do it in C.
- Please don't pack any links in short descriptions. That disturbs
reading the function toc a lot. And 20 links to the class we're
currently viewing doesn't bring so much help.
- Take care what to write where: You had a larger description in a
shortdesc of GtkColorSelection while the <desc> tag had just a single
line of text.
- Did you indent your line with dots sometimes?
> Use the constructor to create a new
>....<classname>GtkColorSelectionDialog</classname>.
Don't do that, please.
- When writing examples, DON'T use tabs.
- Shortdescs should be short:
> OK button widget of the
> <classname>GtkColorSelectionDialog</classname>
The second line was repeated for all properties - that isn't needed.
- If you quote some string, you can often use the <literal> tag to
achieve the same semantic effect:
> is automatically changed to 'Free' when
to
> is automatically changed to <literal>Free</literal> when
> How can I create two examples for two constructors of the same class?
> eg) GtkExpander() and GtkExpander::new_with_mnemonic() are both
> constructors. If I want two seperate examples for each of them, how do
> I name the example files?
constructor.phpw and constructor2.phpw
>$window = &new GtkWindow();
>$window = new GtkWindow();
The first one had to be used in php4 with php-gtk1, as the default
action was to copy object when assigning them. The "&" made clear that
one wanted to have a reference to that object.
This behavior has changed with php5, pass-by-reference is default. So
using the "&" isn't necessary any more and strongly discouraged.
> Thanks and Regards,
Thank you, Anant.
--
Regards/MfG,
Christian Weiske
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc
Attachment: [application/pgp-signature] OpenPGP digital signature signature.asc