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

Msa Altair Inlet Dust Filters 5 Pack, 808935
$8.99
Msa Altair Inlet Dust Filters 5 Pack, 808935 pictureMSA ALTAIR & BW Gas Alert Clip 2 Extreme H2S Gas Monitors AS-IS FOR PARTS REPAIR
$14.99
MSA ALTAIR & BW Gas Alert Clip 2 Extreme H2S Gas Monitors AS-IS FOR PARTS REPAIR pictureLot of 3 MSA Altair So2 Pro and H2S Gas Detectors
$10.0
Lot of 3 MSA Altair So2 Pro and H2S Gas Detectors pictureMSA Altair Single Gas H2S Hydrogen Sulfide Detector
$90.95
MSA Altair Single Gas H2S Hydrogen Sulfide Detector picture Calibration Assembly With Cap Tube And Connector for Altair 4 Gas Detectors
$30.99
 Calibration Assembly With Cap Tube And Connector for Altair 4 Gas Detectors picture






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