tabs

Login to reply to this topic.
Tue, 2008-07-01 14:08
Joined: 2008-06-27
Forum posts: 19

please help me i m new in symbian development .i m making a application with two tabs ,
two views and two containers. i wrote resources in rss . implemented offer key event funtion
but i still i am not able to switch between tabs..plzz tell me where to declare n define navi decorator
and i wrote this code in container.cpp
TKeyResponse CMultiViewsContainer1::OfferKeyEventL(const TKeyEvent& aKeyEvent, TEventCode aType)
{
if (aType != EEventKey)
{
return EKeyWasNotConsumed;
}

CAknTabGroup* iTabGroup = (CAknTabGroup*) iNaviDecorator->DecoratedControl();
if ( iTabGroup == NULL )
{
return EKeyWasNotConsumed;
}

TInt active = iTabGroup->ActivateLocalViewL();
TInt count = iTabGroup->TabCount();

switch ( aKeyEvent.iCode )
{
case EKeyLeftArrow:
if ( active > 0 )
{
active--;
iTabGroup->ActivateLocalViewL(TUid::Uid(EMultiViewsView2Id));
}
break;
case EKeyRightArrow:
if( (active + 1) < count )
{
active++;
iTabGroup->ActivateLocalViewL(TUid::Uid(EMultiViewsView2Id));
}
break;
default:
return EKeyWasNotConsumed;
break;
}
but the error is coming that unidentified identifier i navi decorator and ative local viewL
plzzz tell me where to define n how


Tue, 2008-07-01 14:13
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: tabs

Typically since the variable name is preceeded by 'i', meaning an instance variable, it is declared in the header file, in your case it could be container.h.

Tue, 2008-07-01 14:14
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: tabs

Also ActivateLocalViewL may not be available here, you might have to use ActivateViewL (Check SDK docs for what is inheriting what and if that method is available for the class)

Wed, 2008-07-02 08:00
Joined: 2008-06-27
Forum posts: 19
Re: tabs

i have define inavidecorator in container.h but can u plzz tell me where to deine activatelocalviewL( ) and how

Thu, 2008-07-03 12:47
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: tabs

Well you can check what your container class is inheriting from. Check the SDK documents to see which method is available for that class to activate view .

Thu, 2008-07-03 13:14
Joined: 2008-06-27
Forum posts: 19
Re: tabs

thanks for ur cooperation....ur valuable views....i have done it...n m enjoying it......

Fri, 2008-07-04 12:42
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: tabs

nice Eye-wink

  • Login to reply to this topic.