03-05-2013 12:57 AM
I tried the online example available in BB10 documentation for Picker.
But when I use the same code, it gives me the following error '1061: Call to a possibly undefined method setListWidth through a reference with static type Picker.'
I have included all the required classes.
Solved! Go to Solution.
03-05-2013 02:31 AM - edited 03-05-2013 02:45 AM
That's weird. I get the same error code but for the keepOpen property, not for the setListWidth() method.
I'm compiling w/the Gold December drop of the SDK.
If I comment out the line that sets the picker.keepOpen property, it compiles w/out errors.
The API doc for the picker class doesn't show a keepOpen property.
Looks like the docs are broken again?
Example code needs to be revision controlled and regressed against the SDK to which it applies,
prior to publication, because of the leverage the quality of these docs has - i.e. because
an unchecked typo by one person can potentially trip up thousands of developers, needlessly.
03-05-2013 04:10 AM
Thanks for checking this!
I guess I am using the previous version of SDK and hence the problem. I would have to download the latest SDK and use that.
Also as you suggetsed, the example should contain some info about the SDK version used.
03-05-2013 04:36 AM - edited 03-05-2013 04:38 AM
Going forward the BB10 API's are supposed to be stable, so IMO BlackBerry docs teams should be validating all of their example code against these final stable API's prior to publishing it, and example code should be under revision control so that there is accountability.
Again, a simple omission/inclusion by one person inside BlackBerry can cause wasted time for thousands of developers.
03-07-2013 01:33 AM - edited 03-07-2013 01:35 AM
I tried with the latest SDK and it compiles correctly(only when I comment picker.keepOpen = true) but when I click on Picker, it gives me following error:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
............... and many more lines of error
I assume that, this component works well as others in AIR when tested in Flash CS5 environment and don't need to test on simulator only.
What is still surprising is it is trying to locate 'E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxu
Has anyone tried uing this component?