company logo

Property :: currentPosition - Current index property

The property is the position of the currently located instance in the property handle in the selected access key index. The current position is a non negative value when an instance has been located in the property handle (e.g. locateKey()) regardless whether the instance has been selected or not.

Return value:  Position in collection ( int32  )

The position of an element in a collection is beginning with 0 for the first element.

Implementation overview

Implementation details

  1. Get current index
    int32 Property  :: currentPosition (  )

    The function returns the position of the currently located instance in the collection according to the selected access key. The property returns a non negative value when an instance has been located in the property handle (e.g. locateKey()) regardless whether the instance has been selected or not.

    When no instance is located in the property handle, the property returns -1.

    Since the position might change when instances are inserted or removed from the collection, the current index can be used for accessing instances (get(iPosition)) in a limited way, only (e.g. within a transaction).

  2. to list
  3. Set current position in property handle
    int32 Property  :: currentPosition ( int32 iPosition )

    The function sets the current position (offset) of the property handle to the value passed in iPosition. When the property handle is selected, changes on the selected instance are saved before changing the position. When the position passed in iPosition is less than 0, the property handle is positioned on top.

    In case of activated filter condition, the function does not check the filter condition. When the position passed is greater or equal to the absolute collection count, the function returns an error.

    • iPosition - Position in collection

      The position of an element in a collection is beginning with 0 for the first element.

  4. to list