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
Contributor
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified
Accepted Solution

How can i return result from popup to parent screen

Hi guys

This is probably a very simple question.

How can i return result from popup to parent screen ?

thanks

Developer
Posts: 172
Registered: ‎04-19-2010
My Device: Bold 9700

Re: How can i return result from popup to parent screen

[ Edited ]

Hi dpolonsky,

 

due to the fact your popup and parent screen are in separate classes.

So you have to create your own set and get methods/functions which can be called from the other class.

Because variables are known only in the class they were defined(information hiding), so you have to use functions/methods which sets them to the apropriate values.

 

in your parent class you can define a method like:

 

void setFromPopup(int intval) {

  globalintvalfrompopup = intval; // globalintcalfrompopup is globally declared within your class

}

 

and in your child(popup) class you can call it via

 

.

.

int testint = 10;

parentclass.setFromPopup(testint);

.

.

 

This is a general JAVA question.

 

Hope it will help.

 

cu
michael
--------------------------------------------------------------------------------------------------------------------------
please give kudos to thank everyone who helped you or put you in the right direction.
please mark the thread as solved, if you found your solution.
Highlighted
Contributor
Posts: 27
Registered: ‎10-02-2010
My Device: Not Specified

Re: How can i return result from popup to parent screen

Thanks for the tip !