On Thu, 2009-10-29 at 01:50 +1100, Patrick Castle wrote:
> Thanks for that. I looked back at the Genie page and did a bit of Googling. I 
> think I understand the distinction between field and property. It would seem 
> from a good practice point of view that fields would generally be private and 
> properties would generally be public. Would that be a reasonable way to 
> explain it? If so - I understand where I would want to use one or the other.
> 

no

You would use a property mainly for design time setting as they can be
introspected (EG think glade and setting properties on a widget when
designing) or if you needed explicit getter/setter methods or the
ability to override them. 

Fields by comparison are for runtime usage only and cannot be
introspected nor can they have get/set methods or be readonly or
virtual/overridable etc


jamie

_______________________________________________
Vala-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/vala-list

Reply via email to