Not able to remove error : Function call not matching.

Login to reply to this topic.
Wed, 2008-01-23 08:29
Joined: 2008-01-23
Forum posts: 21

#include "SymplPlayerAppUi.h"
#include "SymplPlayerView.h"
#include "MyPlayer.h"
#include "SymplPlayer.hrh"
#include QikCommand.h
#include "QikAppUi.h"
#include "SymplPlayerGlobals.h"
#include "coecntrl.h"
#include
#include

/**
2nd stage construction of the App UI.
Create view and add it to the framework.
The framework will take over the ownership.
*/
void CSymplPlayerAppUi::ConstructL()
{
// Calls ConstructL that initiate the standard values.
BaseConstructL();

iPlay = CPlayer::NewL();

// Create the view and add it to the framework
iPlayView = CSymplPlayerView::NewLC(*this,*iPlay);
AddViewL(*iPlayView);
CleanupStack::Pop(iPlayView);
}

CSymplPlayerAppUi::~CSymplPlayerAppUi()
{
if(iPlay)
{
delete iPlay;
iPlay=NULL;
}
}

void CSymplPlayerAppUi::HandleCommandL(CQikCommand& aCommand)
{
switch(aCommand.Id())
{
// Just issue simple info messages to show that
// the commands have been selected
case ESymplPlayerInfoPrint1Cmd:
{
// Shows an infoprint
iEikonEnv->InfoMsg(R_INFOPRINT1_TEXT);
iPlay->PlayL();
break;
}
case ESymplPlayerInfoPrint2Cmd:
{
// Shows an infoprint
iEikonEnv->InfoMsg(R_INFOPRINT2_TEXT);
iPlay->Pause();
break;
}
case ESymplPlayerInfoPrint3Cmd:
{
// Shows an infoprint
iEikonEnv->InfoMsg(R_INFOPRINT3_TEXT);
iPlay->Stop();
break;
}
// Go back and exit command will be passed to the CQikViewBase to handle.
default:
CQikViewBase::HandleCommandL(aCommand);
break;
}
}

For this code i am getting error as "Function call [CSymplPlayer].Handlecommand does not match with "CQikViewBase::HandleCommandL
(CQikCommand)(non static)

Can anyone tell me changes i need to do.


Thanks n Regards,
Sapna


Wed, 2008-01-23 14:07
Joined: 2003-12-05
Forum posts: 587
Re: Not able to remove error : Function call not matching.

Does your CSymplPlayerAppUi really inherit from CQikViewBase? View classes inherit from CQikViewBase, not UI objects.

Thu, 2008-01-24 05:20
Joined: 2008-01-23
Forum posts: 21
Re: Not able to remove error : Function call not matching.

I had refered some example code and tried to implement the same ... in that code this handle command was used in APPUI n it was not inherited from CQIKVIEWBASE...

can use say me any alternate way to use this handle command in AAPUI.


Thanks n Regards,
Sapna

Mon, 2008-01-28 13:24
Joined: 2004-11-29
Forum posts: 1134
Re: Not able to remove error : Function call not matching.

The problem is that you are trying to call the base class implementation of a class you have not inherited from!

In your AppUi, you would need to call CQikAppUi::HandleCommandL, and not CQikViewBase::HandleCommandL

Tue, 2008-01-29 10:31
Joined: 2008-01-23
Forum posts: 21
Re: Not able to remove error : Function call not matching.

Thank you i got ti....


Thanks n Regards,
Sapna

  • Login to reply to this topic.