Show in Frame No Frame
Up Previous Next Title Page Index Contents Search

9.4.2 Non-Properties and Properties

MEAny valueAt (MEOop receiver, int valueAt)

Returns an MEAny representing the nth property value of the receiver argument, a NonProperty MEOop. The second argument must be an integer, starting with 1 for the first property.

MEAny setValueAt (MEOop receiver, int valueAt, MEAny put)

Sets the value of the the nth property value of the receiver argument, a NonProperty MEOop. The second argument must be an integer, starting with 1 for the first property. The third argument is an MEAny containing the value for the property. Returns an MEAny containing the MEOop of the property that was changed, or an MEAny containing an MENull if unsuccessful (e.g. if the value is not of the right type or fails the property type's regular expression rule; uniqueness is not checked).

MEAnyArray allPropertiesValues (MEOop receiver)

Returns an MEAnyArray of the values of the properties of the receiver argument, a NonProperty MEOop.

MEOopArray allProperties (MEOop receiver)

Returns an MEOopArray of the properties of the receiver argument, a NonProperty MEOop. (Note this returns the actual properties, not their values: if you want the values, use allPropertiesValues.) This can be useful when working with property sharing; note though that instProps requires an MEAnyArray, so each MEOop returned here would have to be wrapped in an MEAny. The method allPropertiesWrapped returns such an MEAnyArray.

MEAnyArray allPropertiesWrapped (MEOop receiver)

Returns an MEAnyArray of the properties of the receiver argument, a NonProperty MEOop. (Note this returns the actual properties, not their values.) This is useful for setting up property sharing, since instProps requires an MEAnyArray of properties. To get just the properties as an MEOopArray, use allProperties. To get just their values, use allPropertiesValues.

string allLocalNamesString (METype receiver)

Returns a string with the local names of the properties of the receiver METype argument, one per line.

MEAny valueForLocalName (MEOop receiver, string valueForLocalName)

For the receiver argument, an MEOop representing a NonProperty, return an MEAny representing the value of the first property whose local name matches the second argument, a string. The MEAny will hold the value of the property if successful, or an MENull if the string is not a local name in this type.

MEAny setValueForLocalName (MEOop receiver, string valueForLocalName, MEAny put)

For the receiver argument, an MEOop representing a NonProperty, set the value of the first property whose local name matches the second argument, a string, to be that in the MEAny in the third argument. Return an MEAny holding either: the MEOop of the property if successful; or an MENull if the string is not a local name in this type, the value is not of the right type, or it fails the property type's regular expression rule; uniqueness is not checked.

MEAny propertyForLocalName (MEOop receiver, string propertyForLocalName)

For the receiver argument, an MEOop representing a NonProperty, return an MEAny representing the first property whose local name matches the second argument, a string. The MEAny will hold the MEOop of the property if successful, or an MENull if the string is not a local name in this type.

MEAny setPropertyForLocalName (MEOop receiver, string propertyForLocalName, MEOop put)

For the receiver argument, an MEOop representing a NonProperty, set into the first property slot whose local name matches the second argument, a string, the MEOop representing a Property in the third argument. Return an MEAny holding either: the MEOop of the property if successful; or an MENull if the string is not a local name in this type. The legality of the property is not checked.

MEAny instProps (METype receiver, MEAnyArray propColl, MEAnyArray valueColl, MEAny np, MEAny inArea)

Creates or sets the properties of an instance of the METype argument, returning an MEAny with the MEOop of the instance, or MENull for an error. The first argument is the METype; propColl is an array of MEAnys, either MEOops of existing property instances or MENull to create a new property of the default type; valueColl is an array of MEAnys, the values of the properties; np is an MEAny, either the MEOop of an existing NonProperty of this type, or MENull to create a new one; inArea is an MEAny, either an integer corresponding to the project's area number, or MENull for the default (the same project as np if it exists already, else the current default project). Property values are assumed to be as desired: regular expression rules and uniqueness are not checked.

MEAny instPropsLocking (METype receiver, MEAnyArray propCollLocking, MEAnyArray valueColl, MEAny np, MEAny inArea)

As instProps, but also locks the properties, np and other internal objects if necessary.

MEOop unsafeNew (METype receiver)

Create and return the MEOop of a new instance of the receiver argument, a NonProperty type METype. The result is created in the current default project. Properties are created with their default values, and the result is not checked against the metamodel rules.

MEAny createGraphDialog (METype receiver) *

Opens the Create Graph dialog, with the Graph type in the first argument as the initial selection (or none, if this is the Graph metatype). Creates the graph and returns an MEAny containing the new graph's MEOop, or MENull if creation was cancelled or unsuccessful. As the graph is new, it will have at most one representation, which can be found from its repSet.

MEAny createFromPropertyDialogInArea (METype receiver, int createFromPropertyDialogInArea) *

Opens a property dialog to create a new instance of the first argument, an METype. The project to store the new instance in is specified by the second argument, an integer. Valid numbers are 3 and above, and an existing instance's project/area number can be found from the areaID of its MEOop. Returns an MEAny, containing the MEOop of the new instance or an MENull if unsuccessful.

boolean propertyDialog (MEOop receiver) *

Opens a property dialog for the receiver argument, an MEOop of a NonProperty instance. Returns true if the edit is successful or false if the user cancels.
*) Note that if the user takes a long time in the dialog, the API call may time out. In that case the dialog remains open, and actions taken there are valid — the API caller just doesn't hear about the results after receiving the timeout notification.

Show in Frame No Frame
Up Previous Next Title Page Index Contents Search