company logo

Property :: contextEnabled - Context enabled property

The property provides, whether context actions are enabled, i.e. context events will be generated or not. Property and type contexts for the related type are managed by this property, i.e. both are either disabled or enabled. When the type inherits shared from other types, the type context for shared base types has got the same state as the property type.

When the property handle refers to an operation path or transient property, the context enabled property refers to the state of the property and the result property. When the result property changes (e.g. calling setTransientReference()), the contextEnabled state of the result property will be reset to true. Assigning a new result property to the property handle, the result property will inherit the current state of the contextEnabled property.

Notes:

When running in client/server environment, context will be enabled/disabled on client and server side.

Return value:  Enable resource ( bool  )

In order to enable the referenced resource true should be passed. Passing false will disable the resource.

Implementation overview

Implementation details

  1. Get context enabled state
    bool Property  :: contextEnabled (  )

    The function returns, whether context event handlers are active (true) or not (false).

  2. to list
  3. Setting context enable property
    bool Property  :: contextEnabled ( bool bEnable )

    Calling the function with bEnable false will disable the context. Calling it with true will enable context event handlers.

    Changing the contextEnabled state to false will disable context actions for property and type context, and (when the property has got a result property) the property and type context for the result property.

    For weak-typed collections, the type context associated with the property handle will change as soon as the type of the instance selected for the property handle changes. When the contextEnabled property is set to false, the type context will be disabled immediately when being changed.

    Within an application, the context might be enabled or disabled directly (BaseContext::enabled). When the property handle has disabled the context feature, enabling the context directly (context().enabled(true)) will change the state of the BaseContext::enabled property until a new instance will be positioned or selected in the property handle. In order to enable the context state permanently, one has to change the contextEnabled() property.

    Notes:

    Changing the contextEnabled state for a property changes the state in the cursor managed by the property handle, i.e. all property handles referring to the same cursor will reflect this change.

    • bEnable - Enable resource

      In order to enable the referenced resource true should be passed. Passing false will disable the resource.

  4. to list