×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    ALLOC : Hide/Show Tabs

    Hello all,
    I am doing follow steps for hide/show navigation tabs.

    .h
    Code:
    CAknNavigationControlContainer *iNaviContainer;
    CAknNavigationDecorator* iNaviLabelDecorator;
    .cpp
    Code:
    void CImageViewer::HideTabs(TBool bFlag)
    {
    	CEikStatusPane* sp = iEikonEnv->AppUiFactory()->StatusPane();
    	iNaviContainer = (CAknNavigationControlContainer *)sp->ControlL(TUid::Uid(EEikStatusPaneUidNavi));
    	iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();
    	static_cast<CAknNaviLabel*>(iNaviLabelDecorator->DecoratedControl())->MakeVisible(ETrue);
    	if(bFlag)	iNaviContainer->PushL(*iNaviLabelDecorator); //hides
    	else 		iNaviContainer->Pop(iNaviLabelDecorator);  //shows
    }
    In ConstructL() to hide the tabs I am calling HideTabs(ETrue) and in destructor I am calling HideTabs(EFalse) and deleting the iNaviContainer and iNaviLabelDecorator.
    destuctor
    Code:
      HideTabs(EFalse);
            if(iNaviContainer) 	delete iNaviContainer;
        	if(iNaviLabelDecorator)	delete iNaviLabelDecorator;
    But I am getting Alloc for
    iNaviLabelDecorator = iNaviContainer->CreateNavigationLabelL();

    Can any one tell me what can I do to remove the alloc panic for iNaviLabelDecorator in my case?

    Regards,
    Kavit.

  2. #2
    Registered User
    Join Date
    Nov 2007
    Posts
    444

    Re: ALLOC : Hide/Show Tabs

    Sorry for silly posting.

    Deleting the iNaviLabelDecorator before reassign; solved my problem.

    Regards,
    Kavit.

Similar Threads

  1. help with tabs
    By jonmccune in forum Symbian User Interface
    Replies: 6
    Last Post: 2008-06-28, 17:23
  2. Navigation Tabs (or Tabs Pane) in J2ME/Series 60
    By shadisky in forum Mobile Java Media (Graphics & Sounds)
    Replies: 0
    Last Post: 2005-05-05, 19:48
  3. Navigation Tabs (or Tabs Pane) in J2ME/Series 60
    By shadisky in forum Mobile Java General
    Replies: 0
    Last Post: 2005-05-05, 19:43
  4. Can't navigate tabs after adding list!!!
    By advocatee in forum Symbian
    Replies: 7
    Last Post: 2003-07-11, 09:13
  5. Re Display of Tabs
    By jimdeal in forum Symbian
    Replies: 1
    Last Post: 2003-06-20, 20: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
  •  
×