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
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Invoking a screen from a different class

Hi all,

 

I have created an application with 3 screens and have placed a message listener in first class/java page and went to another page/screen and want to invoke the message listener of the first page. 

 

Please let me know how we can do it.

 

Thanks in advance

 

Regards

LTCCTL

New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: Invoking a screen from a different class

Hi all,

 

Sorry the question I posted was wrong. The correct question is as follows:

 

I have one screen(extended it as "MainScreen") , I want to invoke that screen from other classes.

 

 

Please let me know how we can do it.

 

Thanks in advance

 

Regards

LTCCTL

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Invoking a screen from a different class

Use "pushScreen(YourMainScreen)"

Use Search. "Accept Solution" If the problem is resolved.
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: Invoking a screen from a different class

Hi,

 

I am using eventDispatcher to invoke the Mainscreen suppose A  which have a DefaultMenu. I am able to go to the specific page/screen using pushScreen() and do the required task, now I want to go back to my main page/screen directly without pressing any back button.

 

I was trying to use the pushScreen() to go back to main page/screen however it is not working.

 

Please let me know how we can do it.

 

Thanks in advance

 

Regards

LTCCTL

 

 

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

Re: Invoking a screen from a different class

popscreen
----------------------------------------------------------
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
New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: Invoking a screen from a different class

Hi,

 

Thanks for your reply.

 

I am now able to navigate from one screen/page to another. There is just one problem whenever I am going back to main screen/page the menu item "Full menu" gets active and is there on the screen. I want to hide this.

 

Please let me know how we can do it.

 

Regards

LTCCTL

Developer
Posts: 4,764
Registered: ‎07-21-2008
My Device: Not Specified

Re: Invoking a screen from a different class

You probably have a button somewhere that is not consuming the navigation click, or possibly you are looking at a keychar() event and not consuming the event.

 

Can't tell you how to fix it because I don't know how you are handling the navigation.

 

There are thousands of pages of documentation and numerous examples for these API's - everything you need to know is in there. Read the Javadocs for ButtonField, Screen, Field - your answers are in there.

 

 

 

 

 

New Developer
Posts: 45
Registered: ‎08-16-2008
My Device: Torch 9800, Bold 9700, Storm 9550, Curve 8520
My Carrier: Airtel

Re: Invoking a screen from a different class

Hi,

 

Thanks for your reply.

 

I am able to navigate from one screen/page to another using the enter key not the trackball, earlier I was using the trackball to enter(as it was working as a enter key)

 

Regards

LTCCTL