Variables accessed across forms
| Wed, 2005-09-21 23:29 | |
|
I have problems with using variables in a midlet.
I have a variable which I want each screen to have access to. This variable wonÂ’t be changed once obtained but it first must be extracted from a text field. So the user enters details in the textfield. In that screen the variable stores the value by textField.getString(); But if I access that variable in any other screens, the variable is empty. Any ideas? Thank you Kind Regards |
|






Forum posts: 14
why dont u make ur variable static and use it all across ur project.
If it doesnt work, tell me.
Cheers,
Amulya
ARB
Forum posts: 6
Hi
Thank you for your help but
I still just get an empty string when the varible is accessed from the other classes.
Forum posts: 14
Its strange it is still not working.
Anyways, could u send me the code fragment where u have declared ur variable
and where u are accessing it.
I think this problem is solvable.
Cheers,
Amulya
ARB
Forum posts: 6
I decided to use Record Store to store the information it sloves the problem anyways.
Thanks again,
All The Best