Developers Manual 1.20

1. Defining the Object Model

1.1 Specifying a Class

In the simplest case, just the class of object held is needed. Supported classes are:

Example (for an imaginary class Person)

define: #surname as: String;
define:
#dateOfBirth as: Date;
define:
#annualSalary as: Float;
define: #isMarried as: Boolean;
define: #numberOfChildren as: Integer;

Additionally, any other class defining an addClassDefinitionTo: method may be used. This allows your classes to reference each other or even themselves:

define: #sex as: Gender;
define:
#homeAddress as: Address;
define: #workAddress as: Address;
define: #spouse as: Person

 

1. Defining Classes

2000-2003 Solutions Software Ltd.

Home | Index | Next