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
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -
Accepted Solution

BB10: Problems using Picker

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.

Please use plain text.
Developer
UberschallSamsara
Posts: 1,026
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

Can you post a link to the example code you tried, or post your code in this thread w/the code editor clipboard?

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

This is the article Create Picker

Please use plain text.
Developer
UberschallSamsara
Posts: 1,026
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

[ Edited ]

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.

 

 

 

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

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.

Please use plain text.
Developer
UberschallSamsara
Posts: 1,026
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

[ Edited ]

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.

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

We hope to have this in place, as it will surely save a lot of time for developers!

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

[ Edited ]

Oops..

 

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.
    at NonDisposableBitmapData()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\utils\DisplayObjectUtils.as:218]
    at qnx.fuse.ui.utils::smileyvery-happy:isplayObjectUtils$/getDisplayAsset()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\utils\DisplayObjectUtils.as:202]
    at qnx.fuse.ui.theme::ThemeBase/getSkinAsset()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\theme\ThemeBase.as:72]
    at qnx.fuse.ui.theme::ThemeGlobals$/getSkinAsset()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\theme\ThemeGlobals.as:204]
    at qnx.fuse.ui.skins::UISkin/getAsset()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\skins\UISkin.as:167]
    at qnx.fuse.ui.skins.picker::smileytongue:ickerListCellRendererSkin/getSkinForState()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\skins\picker\PickerListCellRendererSkin.as:27]
    at qnx.fuse.ui.skins::UISkin/init()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\skins\UISkin.as:121]
    at qnx.fuse.ui.core::UIComponent()[E:\hudson\workspace\BB10_1_X-AIR_SDK_API\src\qnxui\src\qnx\fuse\ui\core\UIComponent.as:258]
   ............... 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\qnxui\src\qnx\fuse\ui\utils\DisplayObjectUtils.as' ?

 

Has anyone tried uing this component?

 

Please use plain text.
Developer
UberschallSamsara
Posts: 1,026
Registered: ‎12-29-2010
My Device: PlayBook, Z10 LE, Dev Alpha C

Re: BB10: Problems using Picker

Please confirm you have included the QNXSkins ANE in your build.

Please use plain text.
Developer
SangramPatil
Posts: 271
Registered: ‎01-21-2013
My Device: BB10 Dev Aplha
My Carrier: -

Re: BB10: Problems using Picker

Yes that is included.

 

All other components work, only Picker doesn't!

Please use plain text.