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
Posts: 34
Registered: ‎06-16-2009
My Device: Not Specified
Accepted Solution

Eclipse flags invokeLater as undefined

I trying to make the LBS_LAB (Location and GPS) lab work, using Eclipe and API 4.5.

 

The test app has two classes, the main app class and the LBS_LAB class. The main pass does a   pushScreen(new LBSScreen());

 

The invokeLater is in a method:

 

public void log(final String msg) {
        invokeLater(new Runnable() {
            public void run() {
                _logField.setText(_logField.getText() + "\n" + msg);
            }
        });
    }

 

The project does not build becasuse Eclipse complains that "invokeLater is undefined for the type LBSScreen".

 

Any ideas what am I doing wrong?

Developer
Posts: 16,992
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Eclipse flags invokeLater as undefined

invokelater is a method of application, not screen.

you can use UiApplication.getUiApplication().invokeLater in many cases

----------------------------------------------------------
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
Developer
Posts: 34
Registered: ‎06-16-2009
My Device: Not Specified

Re: Eclipse flags invokeLater as undefined

Thanks that fixed the issue.