02-27-2011 04:28 PM
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/deliverab
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.
02-27-2011 06:45 PM
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?
02-27-2011 10:50 PM
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.
02-27-2011 11:01 PM - edited 02-27-2011 11:03 PM
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:
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.