An object that provides access to the Inspector, Source Editor and streaming engine.

Syntax

[<oRef> =] new Designer( [<object>] [,<filename expC>] )

<oRef>

A variable or property in which to store a reference to the newly created Designer object.

<object>

The object currently being designed

<filename expC>

The name of the file to which the designed object will be saved.

Properties

The following tables list the properties, events, and methods of interest in the Designer class.

Property

Default

Description

baseClassName

DESIGNER

Identifies the object as an instance of the Designer class

className

(DESIGNER)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

custom

false

Whether the designed object will have a custom keyword

filename

Empty string

The name of the file to which the object's class definition is saved. This should be set before the SAVE method is called

inspector

false

Whether the Designer's inspector is displayed

object

Null

The object currently being designed

selection

Null

The currently selected object displayed in the inspector

sourceChanged

false

Whether a change has been made to the object class by the source editor

unsaved

false

Whether changes have been saved

Event

Parameters

Description

beforeStream

 

Just before editor calls the designer object to stream code into the editor.

onMemberChange

<expC>

After a change has been made to a member- property, event or method-of the currently selected object in the Inspector. The parameter, <expC>, is the name of the property, event or method.

onNotify

<source name expC>,

<filename expC>

When notification is received from another object. Currently, this event fires when the Table Designer, or SQL Designer closes, and the first parameter is, "TABLE_DESIGNER_CLOSE", or "SQL_DESIGNER_CLOSE". The second parameter is the filename that was being designed.

onSelChange

 

After a different object has been selected in the inspector and the selection property modified.

Method

Parameters

Description

editor( )

 

Opens a source editor to display the current object.

isInherited( )

<oRef1>, <oRef2>

Determines if an object, <oRef2>, in the designer <oRef1> is inherited from a superclass. By doing so, the isInherited( ) method can be used to programatically enforce rules of inheritance.

loadObjectFromFile( )

<filename expC>

Loads the object property of an existing file. Resets the filename property to <filename expC>.

reloadFromEditor( )

 

Reloads the object from the current editor contents. Resets the sourceChanged property.

save( )

 

Saves the current object to filename.

update( )

 

Causes the source editor to reflect changes made to an object or any of it's components.

Description

Use Designer objects to gain access to the Inspector, Source editor or streaming engine during RunMode. While the Designer's parameters, OBJECT and FILENAME, are listed as optional, they must be used in certain situations.

When modifying a custom class, the filename parameter must be used to specify the file from which the object was loaded. The filename parameter is not necessary when a new class is being derived from the custom class.

When creating a new custom class from a base class, the filename parameter is optional. However, if no parameters are specified, the Designer must subsequently be intialized using it's properties and/or methods.

When designing a new class, the OBJECT and FILENAME parameters must be set.

When modifying an existing class, the loadObjectFromFile ( ) method must be called.