Page 1 of 1

valuesChanged event order?

PostPosted: Wed Nov 22, 2017 10:32 am
by johnit
I use the eventValuesChanged() and eventValuesChanged(column) of one databook in my screen. The values changed listener with the column throws a SilentAbortException in some circumstances. The general values changed event changes some flags.

My problem is that I can't define the order of the events because my values changed event for one column should fire before all other values changed events. Is there a property or an option to define the event order?

Re: valuesChanged event order?

PostPosted: Wed Nov 22, 2017 10:40 am
by Support@SIB
You can't define the order of independent event types, which means:

Code: Select all
eventValuesChanged()

is independent of

Code: Select all
eventValuesChanged(column)


It's possible to configure the event order for each event type via:

Code: Select all
addListener(..., index)

The addListener method has an index as last parameter.

You should know that the general values changed event will be fired before the column related values changed event.

If you have dependencies between your listeners, you should use only general values changed listeners or only column related listeners. It's easy to check for column names:

Code: Select all
event.isChangedColumnName("NAME")

Re: valuesChanged event order?

PostPosted: Wed Apr 18, 2018 2:55 pm
by Sanchos
Are there plans to make this a bit more intuitive and easy to do? I'm just curious.

Re: valuesChanged event order?

PostPosted: Wed Apr 18, 2018 3:26 pm
by rjahn
We didn't know that it's a problem :)

In our daily business, this API is enough, but what's your idea or what's your use-case? We are open for every improvement ;-)