I am having problems trying to use a back button. I want to be able to use a button to go back to the previous screen, but it does not seem to work right.
Within the "Welcome Form" I create an instance of the "Options Form", and then this calls the correct method when the options form.
if (c == CMD_OPTIONS_PAGE) {
display.setCurrent(optionsForm.viewOptionsForm(resumeScreen));
}
In the options form I have set the value passed in "resumescreen" equal to "this.backscreen" in the object. When the "back" button is hit in the "options form", it sets the display back to "this.backscreen".
try {
if (c == backCommand) {
display.setCurrent(this.backScreen);
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
I am not really sure why this does not work, i have output the "backscreen.getTitle()" and this returns "Final Year Proejct", which is the title of the "welcome form".
Does anybody have any examples or help??
Thanks

Reply With Quote



