Symbian
Symbian OS Library

FAQ-0525 How does EIKON determine which processes it displays in the task list?

[Index][spacer] [Previous] [Next]



 

Classification: C++ Category: Application architecture
Created: 10/18/2000 Modified: 08/24/2001
Number: FAQ-0525
Platform: ER5, Symbian OS v6.0, Symbian OS v6.1

Question:
When I click the button labeled with the file name (top right S5) a list of tasks (executing programs) appears. The list contains a number of applications but not other executables such a servers. Why?

Answer:
Any application that registers a window group with the window server will appear on the task list, it doesn't matter whether its an .app or a .exe. As most servers do not have a UI (hence no window group), they do not appear on the task list.

The click on the file name label button (instance of CEikFileNameLabel) results in a call to the button's HandlePointerEventL method, which passes on the request to the Eikon environment which in turn passes an EEikServShowTaskList event to the Eikon server (via the window server). The event is picked up by the Eikon server by its method CEikServerAppUI::HandleSystemEventL. The Eikon server is a window server client, and contains resources shared across the various Eikon applications (in this case a task list dialog CEikTaskListDialog). The CEikServerAppUI sends a message to the task list instructing it to run CEikTaskListDialog::RunTaskListL. RunTaskListL builds a list of the currently executing tasks using PrepareTaskArraysL and then activates the dialog RouseSleepingDialog.

In order to create a list of tasks it steps through each window group registered with the window server and adds a concatenation of its caption (will use thread name if it doesn't have a caption yet) and associated document name to its list of names. It is this list that will be displayed when the dialog is 'roused'.

When creating an Eikon .app the framework hides creation of the window group, setting its caption and document name. However, the issue does surface when the app supports file switching (i.e. the document name is changed), these apps must explicitly call CEikonEnv::UpdateTaskNameL in the HandleModelChangeL function of the apps UI. The SDK example program \Epoc32ex\Eikfile\ifsimple contains an illustration of this

void CBossAppUi::HandleModelChangeL()
{
:
iEikonEnv->UpdateTaskNameL();
:
filenameLabel->UpdateL();
:
}