×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    18

    Red face Disable the Menu Key(Key code=-12) in j2me

    Hi,
    Pls Help me out for this,

    How to Disable Menu Key in j2me in canvas?
    The Menu Key (Keycode=-12) ?
    Please give me any code for canvas or any Example or Link for that?

  2. #2
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Bournemouth, UK
    Posts
    65

    Re: Disable the Menu Key(Key code=-12) in j2me

    wehn you poll for keystates

    just have an if clause for that button that does nothing. i.e.

    int keyState = getKeyStates();

    if((keyState & MENU_BUTTON) != 0) //replace MENU_BUTTON with whats needed
    {
    //do nothing
    }
    Made With Caffiene And Sleepless Nights

  3. #3
    Registered User
    Join Date
    Nov 2007
    Posts
    18

    Red face Re: Disable the Menu Key(Key code=-12) in j2me

    Thanks a lot for that valuable ans,But my Application Scenario is something Different ...
    pls Help me Out,

    I have whole code in LIST of j2me so Can i disable menukey (keycode=-12) In LIST in j2me?

    and If yes then pls send me the code for that?

    Is it possible to add canvas in the LIST and use the Keypress Method for LIST of canvas?

  4. #4
    Regular Contributor
    Join Date
    Aug 2008
    Location
    Bournemouth, UK
    Posts
    65

    Re: Disable the Menu Key(Key code=-12) in j2me

    you could overide the keypress method so it does exactly what you need it to do. i.e. poll for every button except menu button.

    and as far as my understanding goes, you can put a list into a canvas but noth the other way round. a list however, could take you to other canvasesby way of a 'hyperlink' as it were. if im wrong somebody please correct me i hate giving bad advice
    Made With Caffiene And Sleepless Nights

  5. #5
    Registered User
    Join Date
    Nov 2007
    Posts
    18

    Red face Re: Disable the Menu Key(Key code=-12) in j2me

    Hi,
    This is my code for LIST in the j2me.

    =====================Code Snippet=========================
    showList = load();//load() function returning images with LIST

    passWord_Ok = new Command("Select", Command.OK, 0);
    pwdDataBase_Vector();//Storing the data to the RecordStore
    showList.addCommand(passWord_Ok);
    showList.addCommand(compareOk);
    showList.setCommandListener(this);
    Display.getDisplay(this).setCurrent(showList);//Displaying List //with Images

    ==============PROBLEM========================

    Now my problem is that how can i put the code for the Menukey (keycode=-12) in this described code for List?
    And How can i Disable the MenuKey when i press that key nothing should work on that click event ?
    ===============================================
    I know that what to do but how to do that is my Big Problem in this Particular case....

    Please Provide the Whole Code for this so i can move ahead in my task as i m vry much stucked over here...

  6. #6
    Registered User
    Join Date
    Nov 2007
    Posts
    18

    Unhappy Re: Disable the Menu Key(Key code=-12) in j2me

    Hi,
    This is my code for LIST in the j2me.

    =====================Code Snippet=========================
    showList = load();//load() function returning images with LIST

    passWord_Ok = new Command("Select", Command.OK, 0);
    pwdDataBase_Vector();//Storing the data to the RecordStore
    showList.addCommand(passWord_Ok);
    showList.addCommand(compareOk);
    showList.setCommandListener(this);
    Display.getDisplay(this).setCurrent(showList);//Displaying List //with Images

    ==============PROBLEM========================

    Now my problem is that how can i put the code for the Menukey (keycode=-12) in this described code for List?
    And How can i Disable the MenuKey when i press that key nothing should work on that click event ?
    ===============================================
    I know that what to do but how to do that is my Big Problem in this Particular case....

    Please Provide the Whole Code for this so i can move ahead in my task as i m vry much stucked over here...

  7. #7
    Super Contributor
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,191

    Re: Disable the Menu Key(Key code=-12) in j2me

    talk2mishal or should I say nirajpendal?

    Why are you using two different screen names for you and asking the same question on these boards with different user names. This is not really appreciated on these forums...

    (the other thread in question
    http://discussion.forum.nokia.com/fo...d.php?t=143940)

    I am closing this thread so that people can continue this dicussion in one place only

    best regards
    Hartti Suomela
    Forum Nokia

Similar Threads

  1. TinyLine SVG Minute Toolkit: Optimizing SVG for J2ME
    By girow in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2003-05-05, 18:44
  2. TinyLine SVG Minute Toolkit for J2ME: version 1.4 released
    By girow in forum Mobile Java General
    Replies: 0
    Last Post: 2003-05-05, 16:25
  3. Bug in J2ME JVM on Nokia 3650
    By marcilgen in forum Mobile Java General
    Replies: 0
    Last Post: 2002-12-18, 16:25
  4. read and write Chinese menu in J2ME
    By walterzcm in forum Mobile Java General
    Replies: 0
    Last Post: 2002-11-13, 06:22
  5. menu command using J2ME
    By vchhaochharia in forum Mobile Java General
    Replies: 0
    Last Post: 2002-02-27, 06:45

Posting Permissions

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