• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

help with multiple screens

 
Joel Karimpil
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have a MidLet which needs to display the next screen when a command button is clicked.
the problem i am facing is that the next scren too has command buttons and a class can have only one commandAction method.
so how do i implement functionality for command buttons on multiple screens with the same name?
plz help.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the names to protect the innocent?

Mark
 
Alan Walker
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does "next screen" mean a different displayable (form or canvas)? If so, your CommandAction method can test for that, because the displayable is an argument to the method. (Or you could nominate a different object to be the command listener for your next screen.)

If you're using the same displayable, and changing its contents to make it the "next screen", then you need to have a flag or state code or something similar as an instance variable, and test that in your CommandAction method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic