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).

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 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 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 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).

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)*

Start the Create Graph dialog. Returns an MEAny containing either the new Graph MEOop or MENull if canceled.

MEAny createFromPropertyDialogInArea (METype, int)*

Create a new non-property from a dialog, storing the result in the project specified by the int areaId. Returns an MEAny containing either the new MEOop or MENull if canceled.

boolean propertyDialog (MEOop)*

Open a Property Dialog on an existing non-property. Returns true if the user presses OK, false otherwise.
*) 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