Nokia N97 SDK Example Applications Guide |
Registration Example
1. About this Example
2. Prerequisites
3. Design and Implementation
This tutorial explains the Registration example application, which is a simple application demonstrating the use of the setting
list components in registration form.
The tutorial starts by listing the pre-requisites the user should know before starting this example, and describes how to
build and run the example.
This example has the standard Symbian OS application architecture employing the Application, Document, UI, and View class.
The example makes use of few other Symbian OS concepts which * the reader should be aware of before attempting to understand
this example. These are:
- How to use Setting list component.
- Familiarity with UI scalability.
This application supports changing the screen size when program is running.
This section starts with explaining the capabilities that the program can use. After that, the support using different screen
modes are explained.
The program capabilities are defined in Registration.mmp file: CAPABILITY NONE.
The program takes screen parameters in the start of the application and works with all screen modes. The program supports
changing the screen layout while the program is running. Function HandleResourceChangeL() in class RegistrationAppUi is called
when the resolution is changed.
This example can be built in directory Registration\group by running the following commands:
bldmake bldfiles
abld build winscw udeb
The project can also be created by using IDE command File > Importing project from .mmp File and built from IDE.
After successful build, application can be found and started from Applications > Installed > Registration
S60 provides setting list functionality, which is demonstrated in this example. The setting list functionality is derived
from CAknSettingItemList class.
The example contains setting list input fields: Name, Email, Phone number, Date of Birth, Time, Gender, Login, Password, Slider
and Accept Emails.
Fields Name, Email and Login accept text input. Field Phone number accepts numeric input. Field Date of Birth accepts date
input. Fields Gender and Accept Emails are boolean fields.
Setting list is implemented in RegistrationListbox class. Input dialogs and setting item titles are defined in resource files.
Function CreateSettingItemL() is called when constructing setting list. When a setting item is selected for editing function
EditItemL() is called.
The Options menu commands are handled in CRegistrationAppUi::HandleCommandL(). When Register option is selected function call ValidateInput() is performed. ValidateInput checks email address validity
by searching for one @ character. If one @ character is found, an information note is presented. If email address does not
contain @ character or there is more than one, an error note is presented.
|
© Nokia 2009
|

|