×

Discussion Board

Results 1 to 7 of 7
  1. #1
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    76

    Problem in options menu

    Hi,

    I want to know where i could get the action of cancel key in the menu, since i have an options menu and when i click on options key the menu pops up and the CBAs change from options_back to select_cancel, i want to do some actions when i click on cancel key, but i don't know where i could get the event of clicking cancel key.

    could anybody help please ??

    Best Regards
    Yosr Eman

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,335

    Re: Problem in options menu

    Trap them in your AppUi.cpp under HandleCommandL().

    E.g:

    Code:
    void CYourAppUi::HandleCommandL(TInt aCommand)
    	{
    	switch (aCommand)
    		{
    		case EAknSoftkeyBack: // or EAknSoftkeyCancel or EAknSoftkeySelect etc...
    
    ...
    ....
    ....
    Nokia Developer Wiki Moderation team

  3. #3
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    76

    Re: Problem in options menu

    Thanks for your reply,

    But it didn't work, i didn't get the action inside HandleCommandL of AppUi, i want to get the Cancel key event not the Back key.
    any other guide please ?

    Best Regards
    Yosr Eman

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2006
    Location
    Helsinki, Finland
    Posts
    8,335

    Re: Problem in options menu

    Have you tried to handle the case of EAknSoftkeyCancel ?
    Nokia Developer Wiki Moderation team

  5. #5
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    76

    Re: Problem in options menu

    No, because i put a break point inside HandleCommandL and when i press cancel the event didn't go there, so it will not differ.
    Again, i want to catch the click of cancel key of the options menu not my view.

    Best Regards
    Yosr Eman
    Last edited by yosr eman; 2009-03-03 at 14:50.

  6. #6
    Nokia Developer Expert
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,143

    Re: Problem in options menu

    I don't think you can catch the Cancellation of the options menu in the HandleCommandL(), have not tried catching it ever, since I have not ever got any reason to catch it (actually can not think any good reason either), anyway, you could try checking whether it could be catched from WS events, or whether you could capture it (the right softkey) with high priority. Basically you could start capturing when the menu is put up (see the dynamic menu thing on how to catch that event), and when you catch it, you could go and close the menu.

    Anyway, what is the point on doing so ?

  7. #7
    Regular Contributor
    Join Date
    Sep 2007
    Posts
    76

    Re: Problem in options menu

    The point of doing so is that I'm facing a problem in 5.x, i'm working on an application which have 5 languages, and i'm organizing the localization of the options menu CBAs inside DynInitMenuPaneL function, but the problem is, when i select options then cancel, the CBAs changes from options-back "The CBAs of my view" to select-Cancel "The CBAs of the options menu"
    and when i comment the code inside DynInitMenuPaneL it works properly but without localization for the options menu CBAs.

    This is my problem

    Best Regards
    Yosr Eman

Similar Threads

  1. Replies: 0
    Last Post: 2008-06-12, 18:38
  2. Replies: 5
    Last Post: 2008-01-10, 12:24
  3. slide menu in j2me
    By afka in forum Mobile Java General
    Replies: 4
    Last Post: 2006-09-04, 09:10
  4. Menu Options
    By mshita in forum Mobile Java General
    Replies: 2
    Last Post: 2005-05-30, 03:24
  5. Nokia 6600:Joystick pressed in Canvas invokes options menu, how to disable ?
    By kakoskin in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2004-03-10, 16:10

Posting Permissions

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