PATH  Documentation > Mac OS X > Cocoa > Creating Suite Definitions and Suite Terminology


Previous | Chapter contents | Next | Book PDF

The Structure of a Suite Definition

The property list for a suite definition consists of a series of nested dictionaries. Use appropriate Apple event codes or, if none exists for a certain class of object, attribute, or relationship, use a four-letter Apple event code that you know to be unique.

Suite Dictionary

Key
Value Type or Reference
Description

"Name"

NSString

Name of suite (required)

"AppleEventCode"

NSString

Four-letter Apple event code for this suite (required)

"Classes"

See Class List Dictionary

optional (no classes defined by default)

"Commands"

See Command List Dictionary

optional (no classes defined by default)

"Synonyms"

Synonym List Dictionary

optional (no synonyms defined by default)

Class List Dictionary

Key
Reference
Description

" className "

See Class Dictionary

One per each scriptable class. Must be the name of an Objective-C or Yellow Box Java class.

Class Dictionary

Key
Value Type or Reference
Description

"Superclass"

NSString

Scriptable superclass; must be the name of an Objective-C or Yellow Box Java class. All attributes, relationships, and supported commands are inherited and can be overriden. You can use the notation suiteName . className to designate the class. (Optional.)

"AppleEventCode"

NSString

Four-letter Apple event code for this class (required)

"Attributes"

See Property List Dictionary

Attributes (properties) of the class (optional)

"ToOneRelationships"

See Property List Dictionary

One-to-one relationships (elements) of the class (optional)

"ToManyRelationships"

See Property List Dictionary

One-to-many relationships (elements) of the class (optional)

"SupportedCommands"

See Supported Commands Dictionary

Commands supported by the class (optional)

"InverseRelationships"

See Inverse Relationship Dictionary

An inverse relationship maps a given relationship to the relationship in the destination class of that relationship that points back to this class (optional).

Property List Dictionary

Key
Reference
Description

" propertyName "

See Property Dictionary      

Definition of attribute or relationship. propertyName should map to an instance variable of the class for which there are accessor methods.

Property Dictionary

Key
Value Type
Description

"Type"

NSString

Name of class for values of this property (required)

"AppleEventCode"

NSString

Four-letter Apple event code for this suite (required)

"ReadOnly"

NSString

"Yes" or "No" ("No" is default; optional)

Supported Commands Dictionary

Key
Value Type
Description

" commandName "

NSString

Name of method this class uses to implement the command or "" if the default implementation is sufficient. commandName should be in suiteName . commandName notation if command is not in the same suite as the class.

Inverse Relationship Dictionary

Key
Value Type
Description

" relationshipName "

NSString

Name of an inverse relationship. An inverse relationship specifies a relationship to a class that points back to this class.

Command List Dictionary

Key
Reference
Description

" commandName "

See Command Dictionary

Command definition.

Command Dictionary

Key
Value Type or Reference
Description

"CommandClass"

NSString

Class of command (optional; NSScriptCommand by default). If not default, must be a subclass of NSScriptCommand.

"AppleEventCode"

NSString

Four-letter Apple event code for this command (required)

"AppleEventClassCode"

NSString

Four-letter Apple event class code for this command (optional, is the Apple event code of the suite definition by default)

"Type"

NSString

Class name of result of command or "" if no result (optional, no result by default)

"ResultAppleEventCode"

NSString

Four-letter Apple event code for the return type of the command. Must be present if "Type" value is assigned. Can be "****" if the return type is variable.

"Arguments"

See Argument List Dictionary

Arguments of command (optional, no arguments by default)

Argument List Dictionary

Key
Value Type or Reference
Description

"Type"

NSString

Name of class for this argument (required)

"AppleEventCode"

NSString

Four-letter Apple event code for this argument (required)

"Optional"

NSString

"Yes" or "No" (optional, "No" by default)

Synonym List Dictionary

Key
Value Type or Reference
Description

" Apple event code "

NSString

Class name for which four-letter Apple event code is a synonym.



Creating Suite Definitions and Suite Terminology

Previous | Chapter contents | Next | Book PDF