Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Adobe AIR Development

Reply
Contributor
Posts: 40
Registered: ‎02-27-2011
My Device: Not Specified

Select event from Picker not reliably being dispatched

I'm having a problem with Picker not always dispatching the select event when I manually change the selection in any list. I set up a test case using the Development Guide sample at http://docs.blackberry.com/en/developers/deliverables/23959/Using_picker_complex_lists_1446788_11.js...
I copied that code and added a label and a counter. Each time the select event is captured, the counter increments and is posted as the label text. I then made numerous runs where I used the mouse to change the selection within the picker. I counted the number of changes I actually made and compared that with the number of events recorded by the counter.

The results were not encouraging. On average, 3-4 times per hundred changes, the label visibly changes (and stays changed) in the picker but the select event is not dispatched. I got results as low as 44 dispatches out of 50.

This is a problem (a killer, in fact) for my application. I have topics in the first list and subcategories in the second and third. The subcategories need to change when the user changes the topic and their labels must appear in a separate Label elsewhere. The change is triggered by the select event. They usually change correctly--about 95 times out of a hundred--but not always. I get the same results in the standalone Flash player and in the Playbook simulator.

Does anyone know if this failure is a result of simulating touch with the mouse? Does Picker not behave this way in an actual tablet?

Can I use some other event to overcome the problem. I don't want to use the picker.close event because when a user is making many selections it gets really clunky to repeatedly close and open the picker.

Thanks for any help or ideas. I'll greatly appreciate it.

Highlighted
Developer
Posts: 1,266
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Select event from Picker not reliably being dispatched

Wow, thanks for posting it and it's good to know.  Will be subscribing to this thread.  

 

Haven't seen anything like this so don't have any suggestions to fix, but a few questions:

 

1) Which simulator version(s) did you observe this on?

2) Do you observe this running the picker example on the desktop (i.e. in your computer's AIR runtime and not in the PB simulator)?

3) Do you have any reason to believe your hardware (e.g. mouse button) could be flaky?  I.e. have you done a large number of trials with other controls and determined that the problem is isolated to the picker control?

 

Contributor
Posts: 40
Registered: ‎02-27-2011
My Device: Not Specified

Re: Select event from Picker not reliably being dispatched

1. I get those results with 0.9.3. I believe but am not certain that the event wasn't always dispatched in 9.2 as well.

2. Yes, the results are the same on the desktop. That's with the 10.1 debug player. Now that I think of it I haven't tried a release version. That could conceivably make a difference.

3. Couldn't really check this thoroughly but I did install one different mouse and got the same results.

 

I should mention that I tried a slightly altered version of the Development Guide PickerList flip clock turning off the timer and adding a listener for select and found that the select event wasn't always dispatched there either (or always caught by the handler--not the same thing).

 

I'll keep at it.

Developer
Posts: 1,266
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: Select event from Picker not reliably being dispatched

[ Edited ]

It sounds like you're getting to a point of being reasonably sure there's a bug.  You might consider filing a report on the issue tracker - see this post:

 

http://supportforums.blackberry.com/t5/Tablet-OS-SDK-for-Adobe-AIR/Found-a-bug-Report-it-using-the-D...

 

obviously include enough detail to reproduce the problem, especially for something as intermittent as this.   It's been a while since I set up forum and developer zone accounts so I don't remember if they were separate signups ... you may need to sign up there too.