Prbolem in Changing the Soft Key Labels Dynamically

Login to reply to this topic.
Tue, 2007-10-16 07:21
Joined: 2007-08-31
Forum posts: 54

Hi All

I want to Change the Soft key Labels Dynamically For That, I done Like that But I am getting the panic E32User Cbase -21
what May Be The Problem For This, i have seen this topic in forum every body Telling this solution only but i am getting the Problem colud any body please help me

My code is here
in rss file

RESOURCE AVKON_VIEW r_first_view
{
cba = r_first_screen_cba;
}

RESOURCE CBA r_first_screen_cba
{
buttons=
{
CBA_BUTTON
{
id=ESoftKeyDone;
txt="Done";
}
};
}

RESOURCE CBA r_introduction_screen_cba
{
buttons=
{
CBA_BUTTON
{
id=ESoftKeyDone;
txt="StartNow";
}
};
}
in view.cpp
DoActivateL( const TVwsViewId& /*aPrevViewId*/,
TUid aCustomMessageId,
const TDesC8& /*aCustomMessage*/)
{
m_iContainer = CContainer::NewL( ClientRect(), aCustomMessageId );
m_iContainer->SetMopParent(this);

TInt iPos = Cba()->PositionById(EDone);
Cba()->RemoveCommandFromStack(iPos,EDone);
_LIT(KCmd,"StartNow");
TBuf<16> aCmd(KCmd);
Cba()->AddCommandToStackL(iPos,ESoftKeyStartNow,aCmd); //Getting the Panic here
Cba()->DrawDeferred();

thanks in advance
praveen

  • Login to reply to this topic.