HandleCommandL() on ui.cpp and view.cpp , a lil bit confuse.. HELP!!

Login to reply to this topic.
Fri, 2007-08-03 01:38
Joined: 2007-07-29
Forum posts: 17

this is in settingexampleui.cpp file

void CSettingExampleAppUi::HandleCommandL(TInt aCommand)
    {
    switch(aCommand)
        {
		case EAknSoftkeyExit:	// only softkey handled at this level
            Exit();
            break;
        default:
            break;
        }
    }

this is from the settingListView.cpp file

void CSettingListView::HandleCommandL(TInt aCommand)
    {
	switch(aCommand)
		{
	case ESettingCmdEdit :					// edit current item
		iSettingList->EditCurrentItemL();
		break;
	default :								// anything else
		AppUi()->HandleCommandL(aCommand);	// handled by AppUi
		break;
		}
	}

my question is what's difference between the two.. i understand that this two
classes handles command.. but what's the difference .. thanks.. help would much
be appreciated..THANK YOU!!..


==learning how symbian works==


angelor


Fri, 2007-08-03 07:59
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: HandleCommandL() on ui.cpp and view.cpp , a lil bit confuse.

AppUi owns the AppView...One is responsible for the User interface, while the other takes care of the view. If you notice, unless you edit the current item in app view, you are calling the handle command from the appui.. Well, lots of things go in explaining the details. I would recommend you to read the getting started documents on NewLc and forum nokia. Search for getting started in these two websites you will get lots of help. and trust me, clarifying these doubts early will only help you long term Smiling

Good Luck and cheers
Neil

Fri, 2007-08-03 08:35
NewLC AdministratorSymbian AccreditedForum Nokia Champion
Joined: 2003-01-14
Forum posts: 1902
Re: HandleCommandL() on ui.cpp and view.cpp , a lil bit confuse.

In a multiview application, you can have two kinds of menus:
- application global menu (handled in the AppUi)
- view specific menus (handled in each View).

So depending on how you define your menu in your resource file, you'll need an Appui::HandleCommandL() and/or a View::HandleCommandL()


Eric Bustarret
NewLC Founder & CEO / Professional Symbian OS Consultant

Sat, 2007-08-04 03:21
Joined: 2007-07-29
Forum posts: 17
Re:HandleCommandL() on ui.cpp and view.cpp , a lil bit confuse

Thank you very much for the replies!.. it really helps me.. i have read the getting started tutorials on the newlc and nokia... but still
dont know where to start coding.. my plan is to do first the UI part then the engine later,.. THANKS Again!!...

hey, just want to clarify..about

In a multiview application, you can have two kinds of menus:
- application global menu (handled in the AppUi)
- view specific menus (handled in each View).

does AppUi always handles the global menu, or it can also handle menus for each view..?
sorry im new to these..just want to learn it fast by asking questions..


==learning how symbian works==
==im running out of time,wish to learn it quickly..


angelor

Mon, 2007-08-06 08:36
Forum Nokia Champion
Joined: 2006-10-12
Forum posts: 463
Re: HandleCommandL() on ui.cpp and view.cpp , a lil bit confuse.

does AppUi always handles the global menu, or it can also handle menus for each view..?

From what Eric said, it sure feels like it can Eye-wink

you'll need an Appui::HandleCommandL() and/or a View::HandleCommandL()

Tue, 2007-08-07 08:30
Joined: 2007-04-29
Forum posts: 51
Re: HandleCommandL() on ui.cpp and view.cpp

EEikCmdExit and other commands,which are not handled in view::HandleCommandL(), will be directly delivered to AppUi::HandleCommandL()
You can change the path of handling command via the function,MapCommandHandler

  • Login to reply to this topic.