BlackBerry Forums Support Community

BlackBerry Forums Support Community (http://www.blackberryforums.com/)
-   Developer Forum (http://www.blackberryforums.com/developer-forum/)
-   -   return variable (http://www.blackberryforums.com/developer-forum/127158-return-variable.html)

racsus 04-27-2008 01:50 AM

return variable
 
Hi

I have two screens, in first screen I call the second screen and in this second screen the user put a value, this value I want to return it to the first screen, How can I do it? I can pass values as params since first screen to second screen, but I don't know how can i return it since second screen.

Thanks, oscar

Ivanov 04-28-2008 02:43 AM

define a variable in the second screen and get it from the first screen when the second one is popped from the stack.

Take a look at this example:
How to - Protect BlackBerry applications with a password screen

simon.hain 04-28-2008 03:02 AM

you can use a callback for this. see google for details
you could also use a controller class to store information (MVC).

goulamass 04-28-2008 09:44 AM

Or you could use persitent storage too but for only one variable it might be unappropriate

baran_khan 04-29-2008 05:07 AM

Declare a static variable in the parent and access it from where ever you want...you can assign the value to that static variable and use it on another screen.


All times are GMT -5. The time now is 03:05 AM.

Powered by vBulletin® Version 3.6.12
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.