company logo

Create subordinated property handle

Keywords:  operation path

The function creates a subordinated property handle for the property handle passed in cProperty . The function behaves similar to property handles provided directly by calling property() , i.e. the property handle shares cursor and access mode with other property handles opened the same way.

In order to open a subordinated property handle, the parent property handle passed in cProperty must be opened and the access path in vAccessPath has to be a valid access or operation path.

For untyped or weak-typed parent property handles, the property handle returned depends on the current selection in the parent property handle, i.e. it may change, when another instance is selected in the parent property handle. In this case, the system automatically reopens the property handle.

As long as the access mode has not been changed for the child property it is opened with the access mode set for the parent property. The access mode can be changed later on by setting the accessMode() property, which implicitly changes teh access mode for all sharing property handles.

When the parent property is not valid or an invalid access path has been passed, the function throws an exception.


// fragment: Property person;

Property   children;                  

children.open(person,"children");           // use internal shared cursor

children = person.property("children");     // use internal shared cursor

children.open(person.property("children")); // create private cursor copy

Notes:

The constructor provides the default cursor, which is part if the parent's instance. This cursor will be shared with other property handles created by calling property() or this constructor. Changes made on shared cursor will affect all property handles referring to this cursor. This also includes changing e.g. the property handle access mode. In order to get a 'private' cursor, a copy handle may be created by calling cursorCopy() , which provides a cursor copy that is used exclusively.