View Single Post
  (#3 (permalink)) Old
simon.hain Offline
CrackBerry Addict
 
Posts: 754
Join Date: Apr 2005
Location: hamburg, germany
Model: 8700
Carrier: o2
Default 06-23-2008, 03:47 AM

Quote:
Originally Posted by dynot View Post
I'm stumped! Here's what I'm trying to do.

On the first screen I want to enter 12 different variables. I'm using NumericChoiceField since all variables are less than 20.

At the bottom of the screen I placed a button titled "Calculate" so that when the user clicks it another screen is displayed with results. I'm using the FieldChangeListner to capture the click event and that's where my problem is.

None of the NumericChoiceValues get passed over for the calculations. I'm assuming its because its in a different class. I read somewhere that I can pass these values when the the class is triggered but there was no example on how to do this. I tried to work it out myself but keep getting various errors.

Can anyone give me suggestions?
the clean way to do something like this is to implement a storage class that is known by both screens, using interfaces.
a more simple solution would be to give the second screen a reference of the first and put some public getValue-methods into the first screen.


java developer, Devinto, hamburg/germany
   
Reply With Quote