On Thu, 2008-06-05 at 08:59 +0200, Jean-Yves Lefort wrote:
> On Thu, 05 Jun 2008 00:37:00 -0400
> Behdad Esfahbod <[EMAIL PROTECTED]> wrote:
>
> >
> Likewise, you can implement a class "Foo" containing an int property
> "bar" using the GObject way:
>
[CUT]
>
> or using the Qt way:
>
> class QFoo : public QObject
> {
> Q_OBJECT
>
> Q_PROPERTY(int bar READ bar WRITE setBar)
>
> public:
> void setBar (int value);
> int bar () const;
> };
>
> void QFoo::setBar (int value)
> {
> // ...
> }
>
> int QFoo::bar ()
> {
> // ...
> }
>
> Which way do you prefer?
The Vala way:
public class VFoo : GLib.Object {
public int Bar { get; set; }
}
Now thank you for your whining and let's get productive indeed.
--
Philip Van Hoof, freelance software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
http://pvanhoof.be/blog
http://codeminded.be
_______________________________________________
gtk-devel-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtk-devel-list