BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-27-2008, 01:50 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2008
Model: 8310
PIN: N/A
Carrier: Informatico
Posts: 56
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default return variable

Please Login to Remove!

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
Offline  
Old 04-28-2008, 02:43 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Apr 2008
Location: Germany, BW
Model: -
PIN: N/A
Carrier: -
Posts: 310
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

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
Offline  
Old 04-28-2008, 03:02 AM   #3 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can use a callback for this. see google for details
you could also use a controller class to store information (MVC).
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 04-28-2008, 09:44 AM   #4 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Jan 2008
Location: France
Model: 8310
PIN: N/A
Carrier: Vodafone
Posts: 217
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Or you could use persitent storage too but for only one variable it might be unappropriate
Offline  
Old 04-29-2008, 05:07 AM   #5 (permalink)
Thumbs Must Hurt
 
baran_khan's Avatar
 
Join Date: Apr 2008
Model: 9500
PIN: N/A
Carrier: Airtel
Posts: 110
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

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.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

RAM Electronics RAM-1M4-03 Control
$89.99
RAM Electronics RAM-1M4-03 Control pictureADVANTECH CPU BD PCE-5124 REV A1 WITH QUAD CORE CPU AND 4 GB RAM QTY 2
$140.0
ADVANTECH  CPU BD  PCE-5124  REV A1  WITH QUAD CORE CPU AND 4 GB RAM  QTY 2 pictureADVANTECH CPU BD PCE-5124 REV A1 WITH QUAD CORE CPU AND 4 GB RAM
$75.0
ADVANTECH  CPU BD  PCE-5124  REV A1  WITH QUAD CORE CPU AND 4 GB RAM pictureAB Hydragrip H-10P Hand Pump 8 Ton Psi Ram Pump
$99.99
AB Hydragrip H-10P Hand Pump 8 Ton Psi Ram Pump picture3FYL4 6.14"W STN Color Graphical Touch Panel, 320 x 240 512 KB System RAM *M13*
$199.99
3FYL4 6.14






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.