Bug: Stock Item onChangeSelection Selection Mode = 1

Game development with Board Game Arena Studio
Post Reply
User avatar
RicardoRix
Posts: 2548
Joined: 29 April 2012, 23:43

Bug: Stock Item onChangeSelection Selection Mode = 1

Post by RicardoRix »

There is a potential bug with the onChangeSelection event that is triggered with Selection Mode = 1 (single item only mode).

If you select an item the event is triggered - no problem.
If then you select a different item, the event is triggered 2 times, firstly the 'item_id' argument is undefined. Presumably this is the previous selected item giving a ghost call. The 2nd call is OK.

If you deselect first, then it's OK.
If you click a single item repeatedly then this behaviour is OK, an argument is always given.
User avatar
Brainchild
Posts: 71
Joined: 31 January 2014, 19:42

Re: Bug: Stock Item onChangeSelection Selection Mode = 1

Post by Brainchild »

I noticed this behaviour and just assumed the callback is informing you the selection has changed from "<item> selected" to "nothing selected". Undefined in this case means nothing is selected.

But if you're saying when deselecting a single item you don't get any callback, that does seem weirdly inconsistent.
Post Reply

Return to “Developers”