onObjects

A nullable property for assigning a function or lambda to handle object events. This function is triggered with each new object event, providing a mechanism to manage object-related updates.

Note that this property allows for the assignment of a singular behavior at a time, as any new assignment will override the previous one. For scenarios requiring multiple behaviors in response to object event, it is advisable to utilize EventEmitter.addListener.

To deactivate the current behavior, simply set this property to null.

Setting a Behavior Example:

onObjects = { pnObjectEventResult ->
println("Object event: ${pnObjectEventResult.result}")
}

Removing a Behavior Example:

onObjects = null