Choosing your event handlers
gpapayia 110000S454 Visits (1532)
Let me be the last person to wish you a Happy New Year!
This is a quick post to remind everyone to pay attention to the event handlers you decide to use in your EGL RUI applications. On the surface the event handlers onClick and onChange do the same thing for a ListMulti widget. That said, making sure you use onChange allows your application to function as expected when using the keyboard.
Here is an example to show you what I mean. The following RUIHandler creates a ListMulti widget and prints beneath it the number of items selected. When using the mouse, regardless if I used onClick or onChange the text label would print the correct value. Now, if I select the first element with the mouse, then hold the SHIFT key and use the UP/DOWN keys to select the other list elements, if I had the event handler as onClick those keyboard actions wouldn't be registered. Most of the time you would want them - so be sure to use the onChange event handler.
All the best,