views:

15

answers:

1

Let's say I have two forms: form1 and form2.

After pressing a NEXT_COMMAND in form1, I need to change the value of the gauge in form2 and then show form2. Thus:

public void commandAction(Command command, Displayable displayable) {
....
else if (displayable == form1) {
    if (command == NEXT_COMMAND) {
        form2_gauge.setValue(value);
        display.setCurrent(form2);
    }
....
}
....

However, this doesn't work as I expected it to. It doesn't change a thing at first. On the other hand, if I go back from form2 to form1 and then again from form1 to form2 it would work.

I can't figure it out myself. I'd be enormously grateful of any possible help.

Thanks!

+1  A: 
BlaXpirit
You've got a sharp eye! Sorry, my fault. But that's not the matter with the code however.
Albus Dumbledore
Updated with a suggestion.
BlaXpirit
Well, I certainly *haven't*! It *did* the trick. Can't imagine whhy, though. Thanks a lot!
Albus Dumbledore
What about accept and upvote? ;)
BlaXpirit
Certainly. Sorry I am a bit mentally overwhelmed.
Albus Dumbledore