×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2003
    Posts
    19

    Series 60 keyevents being ignored.

    I have some code that extends FullCanvas. both 7650 ( 3.12 )& 3650 (2.54)

    The game us updated using a timerTask () to call processGame();

    After the first level the key events seem to get disconnected from the canvas object as no key events are received.

    Using both the S60 concept 0.3 (MIDP2) & S60 1.2 the problem does not exist. It only appears on the actual devices.

    myclass extends FullCanvas {

    Timer heart ; // Updater


    ...

    public void keyPressed (int keycode ){
    System.err.println("keyEvent rcvd : "+keycode )
    ....
    }

    protected void processGame(){
    ....
    }
    }

    Can you suggest what may cause this to happen.

  2. #2
    Regular Contributor
    Join Date
    May 2003
    Posts
    72
    This can happen if you use Display.setCurrent() to display someother canvas, the win level screen perhaps. Make sure you are keeping the current display while the game is running. Try using the Canvas.isShown() or showNotify, hideNotify functions to see if that canvas is losing focus.

  3. #3
    Registered User
    Join Date
    Mar 2003
    Posts
    19
    I'm afraid thats not possible as the only thing that happens between being able to play the game, and losing keyevents is that some end of level text gets displayed and a level counter is incremented.

    I have tried diabling this, and the symptoms persist.

    No display switching occurs until the game ends (game over).

Posting Permissions

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