Hello all,
I am doing follow steps for hide/show navigation tabs.
.h
[code]
CAknNavigationControlContainer *iNaviContainer;
CAknNavigationDecorator* iNaviLabelDecorator;
[/code]
.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
}
[/code]
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;
[/code]
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.
