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

Java Development

Reply
Highlighted
Contributor
Posts: 10
Registered: ‎03-10-2010
My Device: 9550
My Carrier: Vodaphone

Manager and isFocusable() = true. Try to avoid this

Hello,

I have spent a day just to debug a silly error.

So I post here and hope that it helps other people:

 

I have a NullPointerException when application starts with stack trace:

net_rim_cldc-9
 Screen
 onDisplay
 0x8D36
net_rim_cldc-9
 Screen
 callOnUiEngineAttached
 0x5F42
net_rim_cldc-10
 UiEngineImpl
 pushScreen
 0xA181
net_rim_cldc-10
 UiApplication
 pushScreen
 0x8233

Main
 main
 0x507

 

As you can see: there is no way to debug this error because it happens inside the JVM.

 

After a lot of testing I found that:

I have a manager A which contains a manager B and I override B::isFocusable() and returns true.

 

So, avoid this if you can. 

 

Ball