×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Dec 2008
    Posts
    20

    form menu processing help???

    i have added a menu in the FORM now i am writing a code to switch to other view under the option menu of that FORM but it gives an error .... any suggestion/comments plz

    Details:
    view switching /// S60 3ed N95


    /////////////////FORM.CPP////////////////

    Code:
    void COpponentFormForm::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
    	{
    	CAknForm::DynInitMenuPaneL(aResourceId,aMenuPane);
    	
    	if (aResourceId == R_AVKON_FORM_MENUPANE)
    		{
    		aMenuPane->AddMenuItemsL(R_MY_FORM_MENU,0,1);   
    		aMenuPane->SetItemDimmed(EAknFormCmdLabel, ETrue);
    		aMenuPane->SetItemDimmed(EAknFormCmdAdd, ETrue);
    		aMenuPane->SetItemDimmed(EAknFormCmdDelete, ETrue);
    		aMenuPane->SetItemDimmed(EAknFormCmdSave, ETrue);
    		}
    	else
    	        {
    	    	CAknForm::DynInitMenuPaneL(aResourceId, aMenuPane);
    	        }    
    	
    	}
    
    
    void COpponentFormForm::ProcessCommandL(TInt aCommandId)
    {
    	switch(aCommandId)
    	{
    	case EMyFormCmdGameSelect:
    		{
    		
    		//AppUi()->ActivateLocalViewL( TUid::Uid( EGQuiz1GameSelectViewId ) );  ///////ERROR on this line
    		}
    	// Handle the command
    	break;
    	case EMyFormSubmit:
    		{
    		SaveFormDataL();
    		}
    	case EAknSoftkeyExit:
    				  {
    	            //Exit();
    	            break;
    				  }
    	default :
    		
    	break;
    	}
    	CAknForm::ProcessCommandL(aCommandId );
    
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,684

    Re: form menu processing help???

    Forms have no AppUi method as far as I know.
    You may rather want to write something like
    Code:
    static_cast<CAknViewAppUi*>(CEikonEnv::Static()->AppUi())->ActivateLocalViewL( TUid::Uid( EGQuiz1GameSelectViewId ) );

Similar Threads

  1. form menu not disappearing??
    By xahid2k in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-07-12, 17:57
  2. form menu disappear ?
    By nokia_lin in forum Symbian User Interface
    Replies: 6
    Last Post: 2009-04-20, 10:49
  3. Replies: 1
    Last Post: 2005-09-08, 10:45
  4. How to get User defined menu items in a form?
    By sridhar_ratna in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2003-03-14, 12:55
  5. Where to handle the user defined menu items in a form?
    By varshajohn in forum Symbian User Interface
    Replies: 2
    Last Post: 2002-11-18, 07:08

Posting Permissions

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