¤¤¤ ¤¤¤ The plan for the training day ¤¤¤ ¤¤¤
The following list of task will take you around most of the basic concepts in Symbian.
This page is part of a one day intensive tutorial day about introduction to programming for Symbian and is not designed for self study.
¤¤¤ Group exercise: Understanding Hello World !¤¤¤
¤¤¤ 1. Using descriptors ¤¤¤
Purpose
Learning to use strings in Symbian
Task
Change the text in the Hello World box - play around with the text classes
Main Classes
TDes, TBuf, HBufC, TLex
CAknInformationNote* informationNote = new (ELeave) CAknInformationNote;
TBuf<80> text;
text.Append(_L("Hello world. The answer to your question is "));
text.AppendNum(42);
informationNote->ExecuteLD(text);
This tutorial explains the basics: NewLC tutorial
¤¤¤ 2. Change Resource names, add menu point ¤¤¤
Purpose
Learning to use resources in Symbian
Task
Change the menu in the Hello World Example, Add new menu items
Main Concept
Resources
helloworldbasic.rss
#include "HelloWorldBasic.hrh"
#include "HelloWorldBasic.loc"
RESOURCE MENU_PANE r_helloworldbasic_menu
{
items =
{
// added the new Options menu command here
MENU_ITEM
{
command = EHelloWorldBasicCommand1;
txt = qtn_hewb_command1;
},
MENU_ITEM
{
command = EAknSoftkeyExit;
txt = qtn_hewb_exit;
}
};
}
helloworldbasic.hrh
enum THelloWorldBasicIds
{
EHelloWorldBasicCommand1 = 1 // start value must not be 0
};
helloworldbasic.loc
//d:First item in "Options" menu pane, "hello" event.
#define qtn_hewb_command1 "Hello"
//d:Second item in "Options" menu pane, "exit" event.
#define qtn_hewb_exit "Exit"
¤¤¤ 3. Make new class – error handling ¤¤¤
Purpose
Be familar with error handling
Task
Make a new class with creation of additional objects
Main Classes
NewL, NewLC, ConstructL, CleanupStack, Leave, TRAP
NewLC Error Handling
Tutorial Part 1
NewLC Error Handling
Tutorial Part 2
¤¤¤ 4. Let it be an active object ¤¤¤
Purpose
Learning to create an Active Object
Task
Create an Active Object that displays a popup box when the timer expires.
Main Classes
Resources
Purpose
Do something fun or something useful - getting to be more familar with Symbian
Task
a) Build a new View e.g. a control view: Purpose is to learn the view architecture
b) Build an image algorithm e.g. find the averange britness: Purpose to learn
camera and images
c) Use bluetooth to connect to sensor e.g. learn more about Bluetooth, implement
image processing.
Resource
Use the handed out example as a start point
¤¤¤ 5a. Build a new View ¤¤¤
CAknViewAppUi, CAknView, CCoeControl
¤¤¤ 5b. Modify image data ¤¤¤
MCameraObserver, CCamera, CFbsBitmap
¤¤¤ 5c. Modify sensor data ¤¤¤