Scripting Messages

The scripting system defines four generic messages that can operate on the specific properties of an object and two meta-messages that query an object about the messages it can handle. See "Scripting" in The Application Kit chapter for a full explanation.

B_COUNT_PROPERTIES

This message requests the number of properties supported by the receiver. It contains no data, but the reply message should contain one field:

FieldType codeDescription
resultB_INT32_TYPEThe number of properties supported.

B_GET_SUPPORTED_SUITES

This message requests the names of all message suites that the receiver supports. It doesn't contain any data, but the message that's sent in reply has one field:

FieldType codeDescription
suitesB_STRING_TYPEAn array of suite names.

A suite is a named set of messages and specifiers. A BHandler supports the suite if it can respond to the messages and resolve the specifiers.

B_SET_PROPERTY, B_GET_PROPERTY, B_CREATE_PROPERTY, B_DELETE_PROPERTY

These messages—as their names state—target a particular property under the control of the target handler. They have the following data fields:

FieldType codeDescription
specifiersB_MESSAGE_TYPEAn array of one or more BMessages that specify the targeted property. See AddSpecifier() in the BMessage class of the Application Kit for details on the contents of a specifier.
datavariableFor B_SET_PROPERTY messages only, the data that should be set. The data type depends on the targeted property.