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
Developer
Jeff_Lu
Posts: 384
Registered: ‎08-12-2008
My Device: 8700
Accepted Solution

Why uiEngine inputscreen is null

Have not touch Java for blackberry for a while,

 

I am entercounting a new problem. please help me to solve this issue..

 

What I am doing is:

 

once user push a button on screen, it will start a thread to parse content, then push new screen on the top,

 

however, once a new screen is pushed, it is said

 

Focus - target lost, prev=null, input=null

 

so i debug it:  what I found is:

 

when my new screen is pushed to stack, uiEngine, inputscreen become null.

 

it is very wired, I have used

_app.invokerLater(new Runnable(){

}) to update my screen.

what will cause uiEngine.inputscreen is null?

 

Thanks,

Jeff

 

 

Please use plain text.
Developer
peter_strange
Posts: 19,602
Registered: ‎07-14-2008
My Device: Not Specified

Re: Why uiEngine inputscreen is null

The information you have given is not really sufficient to analyze your problem. 

 

The code you are using with UiEngine is generally only needed when running a background (ui less) application, i.e. using the Application class.  You are running a foreground application using the UiApplication class.  So I suspect you are mis-using some mechanism along the way.

 

Putting  this another way, if you code is running in a Thread that was started by a UiApplication, you can get back on the event using using

UiApplication.getUiApplication(),invokeLater(...).

 

You should not have to use UiEngine. 

Please use plain text.
Developer
simon_hain
Posts: 16,102
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Why uiEngine inputscreen is null

in my experience this happens when you use uiapplication without any UI.
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
Jeff_Lu
Posts: 384
Registered: ‎08-12-2008
My Device: 8700

Re: Why uiEngine inputscreen is null

Hi Peter/Simon,

 

Nice to see you guys still here.

 

I found my problem. it is caused by initilizing my screen with list field, and app  fill all elements during intilizing.

 

i move that part to out, then every thing works fine.

 

Jeff

Please use plain text.
Developer
peter_strange
Posts: 19,602
Registered: ‎07-14-2008
My Device: Not Specified

Re: Why uiEngine inputscreen is null

Great, can you mark this as solved then?  Cheers

Please use plain text.