×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Jan 2005
    Posts
    154

    Hiding then Showing CBA returns NULL CBA!!

    Hi,

    I am trying to view and hide the CBA in my application depending on the context. I am doing the following but the problem is when i show then hide then show again the custom CBA i get a NULL cba from CEikButtonGroupContainer::Current();

    Code:
    void CMyAppView::HideCustomCBA()
    	{
    	CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
    	cba->SetCommandSetL(R_AVKON_SOFTKEYS_EMPTY);
    	cba->MakeVisible(EFalse);
    	cba->DrawNow();
    	}
    
    void CMyAppView::ShowCustomCBA()
    	{
            // when this is called the first time things work fine
            // But when called again after a call to HideCustomCBA() cba is returned as NULL 
    	CEikButtonGroupContainer* cba = CEikButtonGroupContainer::Current();
    	cba->SetCommandSetL(R_CUSTOM_CBA);
    	cba->MakeVisible(ETrue);
    	cba->DrawNow();
    	iPrevOrdinalPos = cba->DrawableWindow()->OrdinalPosition();
    	cba->DrawableWindow()->SetOrdinalPosition(0);
    	}
    Any suggestion?
    regards
    AF

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: Hiding then Showing CBA returns NULL CBA!!

    you could also try accessing the CBA from your Appui with Cba() function.

Similar Threads

  1. Replies: 1
    Last Post: 2005-12-20, 18:45
  2. midlet.getAppProperty returns null?
    By kinhw in forum Mobile Java Tools & SDKs
    Replies: 2
    Last Post: 2005-04-07, 14:56
  3. conn = (MessageConnection)Connector.open(smsc); returns null
    By JWtheCoolOne in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2005-01-11, 09:30
  4. Calendar.getInstance() returns NULL on Nokia 6600
    By scheung3 in forum Mobile Java General
    Replies: 6
    Last Post: 2004-09-01, 04:57
  5. Personal
    By JSmith77 in forum PersonalJava
    Replies: 4
    Last Post: 2003-07-30, 12:52

Posting Permissions

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