WJW.pdf
(
306 KB
)
Pobierz
Microsoft Word - WJW.doc
A Brief Introduction to the CodeWarrior
™
Development Tools for
Symbian OS
™
By C. Enrique Ortiz
Introduction
The CodeWarrior
IDE provides the same familiar development environment for multiple target
platforms. This is true for all CodeWarrior wireless and PDA development tools, including those
for the Symbian OS.
Symbian OS Applications—Elements and Structure
Symbian OS applications are object-oriented and employ the Model-View-Controller (MVC)
design pattern. An MVC application separates its user interface from its computation logic. A
Symbian OS UIQ application consists of C++ header and source files that together make up the
application (see Figure-1a).
Application
Entry Point
Start
Application
Application
Class
Document
Class
Creates
Document
has
Data Model
User Interface
Class
View(s)
Creates
User
Interactions
User Interface
with command
handler
has
View(s)
Resource File
External resources,
such as databases
User
Figure 1a: Elements of a
UIQ Application
Figure 1b: Structure of a
UIQ Application
Description of program classes:
•
Application’s Entry Point
•
Application Class—
Creates the application’s document and uniquely identifies the
application.
•
Document Class
—Encapsulates application data and provides methods for manipulating
this data and for closing the application.
•
User Interface Class
—Owns all UI controls and handles UI commands.
View Class
—Displays the document’s data and manages the UI and user interactions.
The Symbian OS is an event-based operating system. Symbian OS UIQ applications
communicate with the OS by means of event handlers (see Figure 1b).
•
The User Interface
CodeWarrior Development Tools for Symbian, v7.0 includes support for the
UI for Quartz
, a
GUI framework for handheld devices that provides a standard look-and-feel across all Symbian
OS, UIQ-based devices. The UIQ targets a specific family of devices: PDAs and smart phones
with screen sizes of 240*320 pixels (1/4 VGA) or 208*320 pixels.
Figure 3a shows the UIQ screen layout. While the Symbian OS supports concurrent applications,
UIQ allows just one application to control the screen at a time. This makes UIQ devices simple to
use. To accomplish this simplicity, UIQ applications use list (summary) views and details views.
Typically, a UIQ application first displays a list view that provides a graphical or textual item
summary (see Figure-3b). Selecting a summary item displays that item’s details view (see Figure
3c). Using tabs, an application can provide many different details views.
Application Picker
Menu Bar
Application Space
Status Bar
Figure 3c:
Details View
A typical UIQ application has a menu bar, folders, dialogs, a button bar containing one or more
controls, and/or one or more tabs. Button bars and tabs let users switch between pages.
Figure 3b:
List View
UIQ user interface objects are defined in the application’s resource file. Currently, there is no
WYSIWYG GUI builder for UIQ. Consequently, you must create your resource files manually.
Creating a Symbian OS Project
Using CodeWarrior Development Tools for Symbian OS, you can create a project file using the
IDE’s “New Project” dialog box, or you can import an existing Symbian OS SDK project (see
Figure 4).
Figure 3a: Application
Screen Layout
Figure 4: Symbian OS Project Creation Menu Options
Selecting
File
>
New
from the menu bar displays the “New Project” dialog box. Selecting
File
>
Import
Project
From.
mmp
File
displays the import selection dialog boxes.
The “New Project” dialog box lets you select a specific project type (such as,
Empty Project
)
or use the
Symbian
Stationery
Wizard
to create your project. Stationery are templates for
different project types.
The import selection dialog boxes let you select the desired Symbian OS SDK and the
.MPP
file
to import. The CodeWarrior IDE automatically generates a
.resource
XML file that describes
the Symbian OS resource files and bitmaps.
Building and Running Your Application
The CodeWarrior IDE provides a consistent user interface for multiple target platforms. Figure 5
shows the CodeWarrior project window. This window provides toolbar access to settings and
build options.
Target
Target
Settings
Make
Debug
Run
Figure 5: Project Window
Figure 6: Target Settings Window
To build and run your application, select a build target, such as the UIQ emulator for Windows
(WINSCW), and choose
Project
>
Run
. You can select a release or debug version of any
build target. For debug targets, the IDE launches the UIQ emulator along with debugger (see
Figure 7). Press
Alt-F7
to display a window in which you can configure the linker, access
paths, and other Symbian OS settings (see Figure 6).
The CodeWarrior Debugger
The UIQ Emulator
Figure 7: The Debugger and Emulator Screens
The debugger lets you set breakpoints, view variables, step into/over functions, and more.
Further, the debugger gives you complete control of the execution of your application threads.
Summary
CodeWarrior for Symbian OS enhances your development experience by providing a
full-featured integrated development environment. This environment includes project wizards,
Symbian build components, a source code editor, a debugger, easy platform re-targeting, and
integrated emulators.
Plik z chomika:
arni077
Inne pliki z tego folderu:
Wrox - Professional Java Tools For Extreme Programming.chm
(10619 KB)
Wordware Publishing - Java 1.4 Game Programming.chm
(9524 KB)
WJW.pdf
(306 KB)
Wireless Programming in J2ME - Hungry Minds.pdf
(7603 KB)
Wiley - Programming Java 2 Micro Edition for Symbian OS.pdf
(5863 KB)
Inne foldery tego chomika:
biblioteki i nie tylko
c++
Zgłoś jeśli
naruszono regulamin