×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Aug 2003
    Posts
    34

    Option of "Exit" with Form on S60

    When I test the following code on S60, I get 2 problems

    1) Under "Options" this in only "Exit", which exit the applcation. I don't want "Exit" shown up here,
    while "Log in", which I expect, doesnt show up.

    2) The even of itemStateChanged can't be trigged.

    The same code works on S40 well. Anyone can kindly help?

    public class MyForm extends Form
    implements ItemStateListener,

    private Command command1;

    public MyForm() {
    super("Ttile");

    loginCommand = new Command("Log in", Command.OK, 0);
    addCommand(new Command("Back", Command.BACK, 1));
    setCommandListener(this);
    setItemStateListener(this);
    }

    public void itemStateChanged(Item item) {
    if (someCondition)
    addCommand(loginCommand);
    else
    removeCommand(loginCommand);
    }

    public void commandAction(Command c, Displayable d) {
    }
    }

  2. #2
    Super Contributor
    Join Date
    Nov 2003
    Location
    Bangalore , India
    Posts
    4,429
    Hi.

    The Exit will be comming in default ; I suppose U cannot remove it.

    regards
    Gopal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×