Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Callbacks on Multi-Choice List Gadgets

  • Last UpdatedNov 14, 2022
  • 2 minute read

At PDMS11.6 AVEVA introduced support for Extended Selection Mode for multi-selection lists, whereby CTRL and SHFT keys can qualify the list selection. As a result a whole set of UNSELECT events followed by a whole set of SELECT events can result from a single (atomic) user action. These events are presented in sequence, but AppWare cannot tell where the sequence starts or ends.

At PDMS11.6, problems may arise if a multi-selection list is programmatically changed during the list callback. Modifying the list content or its selection during the sequence can cause unexpected results or even software crashes.

At PDMS11.6Sp1 AVEVA have introduced new START and STOP batch actions to bracket the sequence of UNSELECT and SELECT event actions.

For maximum upwards compatibility, the START and STOP batch actions are only notified to PML if you have assigned an open callback, since this is the only way that different event types (actions) can be differentiated.

AppWare which used simple callbacks and worked at PDMS11.6 will continue to work because START and STOP events will not be notified to it.

AppWare which used open callbacks and worked at PDMS11.6 will continue to work if the SELECT and UNSELECT meta-events were explicitly differentiated in the callback, as shown below, because the new START and STOP events will be ignored.

Define method .listSelectionChanged( !list is GADGET, !action is STRING )

 . . .

 if( !action eq ‘SELECT’ ) then

 . . .

 elseif( !action eq ‘UNSELECT’ then

 . . .

 endif

 . . .

endmethod

If you experience a change in behavior, then you may need to rewrite your callback to explicitly handle the new START and STOP events and modify the list content or its selection only on receiving the STOP event action.

For newly written AppWare AVEVA strongly advise you to use open callbacks to service multi-selection list gadgets.

TitleResults for “How to create a CRG?”Also Available in