Postby ConvertFromOldNGs » Fri Aug 07, 2009 10:59 am
by Dean Cooper >> Sun, 14 Sep 2008 21:00:22 GMT
A non-virtual property (either an attribute or a reference) is one that exists physically on an object. Most properties in a system are non-virtual (that is, the Virtual checkbox in either the Define Attribute or Define Reference dialog is not checked). When you select a property in the IDE, it will show either "non-virtual" or "virtual" in the details panel of the Class Hierarchy Browser to indicate what kind of property it is.
Virtual properties are implemented entirely by a mapping method and have no space allocated for them in the object. So a virtual property allows you to write a (mapping) method that developers can access as though it were a property. That is:
virtProp := someValue;
will invoke the "set" operation of your mapping method, and:
write virtProp;
will invoke the "get" operation of your mapping method. Typically the mapping method behind your virtual property will get/set other property values in your application.
Dean.