Development of Nokia mobile app with s60 OS SDK (4)-interface layer framework and some features

Source: Internet
Author: User
Tags codewarrior
Uikon and Avkon

Series 60 adds a user interface layer (Avkon) to the underlying Uikon of Symbian OS v7.0s.

Uikon is the core user interface of Symbian, and Avkon is the user interface of the S60 platform.
Avkon provides a set of UI components and a software framework designed for Series 60 devices.

UIKON is a user interface and control framework supported by all Symbian OS devices.
AVKON is a 60-series extension and modification to other parts of the UIKON and Symbian OS application frameworks.

The software examples provided in the Series 60 SDK (in the file folder:/Series60Ex) show you how to use avkon for development.
When I saw the code, I was thinking about how to use vc to open it. No dsw, dsp
First look for help.

Solution

For example, hellpworld
When using vc, use abld in the command line to create the HelloWorld. dsp and HelloWorld. dsw project files.

First, go to the Series60Ex/HelloWorld directory. In Symbian, a Project is usually organized by directories such as inc, src, and group. The Project files are stored in the group directory. Run the following command to enter the directory:

Bldmake bldfiles

This command will generate an abld in the group directory. bat batch files, and the SERIES60EX/HELLOWORLD/GROUP directory will be generated under Series60/Epoc32/BUILD, and generated under the bottom directory. make file.

Then, run the generated abld. bat
Abld makefile vc6 can generate VC project files


For metrowerks codewarrior, you can create a project file in IDE in a common way, or directly import the. MMP file to IDE. The import process will create the files required by a specific codewarrior Project (helloworld. MCP.

Similarly, Borland C ++ builder's mobile IDE can execute import transactions similar to metrowerks IDE, But it imports the bld. inf file instead of the. MMP file. For example, Borland C ++ builderx creates a project file named helloworld. cbx.

60 series Application Frameworks
MVC is a common design mode in the user interface design of the 60 platform.

S

Introduction to the basic user interface components of avkon

Without visual interface design, the interface controls and text must be defined in the resource file.
You can also create or modify controls in the code.


Exception Handling

For a small handheld device like a smart phone, once a resource overflow error occurs, the important thing for the system is to return to the previous stable state without losing any important data. This makes it very important for systems and applications to fully capture and handle each running error.

Errors due to resource overflow are called exceptions like all runtime errors. In standard C ++, these exceptions are handled using the try-catch-throw mechanism, but because of its negative impact on the code length, therefore, Symbian OS provides its own mechanism called trap harness.

Another reason for developing their own exception handling programs in Symbian is that the try-catch-throw mechanism is not part of the C ++ standard when developing Symbian OS. The concept of trap-harness is to use a TRAP macro to encapsulate functions that may cause exceptions. This macro can be used to capture multiple functions, and these functions can be nested. In case of an exception, the execution of the abnormal function will be terminated through the User: Leave function, which is equivalent to the throw in the Standard C ++ exception handling. This is called a leave (exit). It executes the TRAP macro to the end of the returned program, where the corresponding recovery action can be executed.

Symbian OS also provides a tool to clear exceptions. A cleanupstack is used to reference only one automatic variable, and an object to be released when a leave appears. The TRAP Macro will destroy the memory allocated by automatic variables in cleanupstack.

Multi-task and Memory Management

The Symbian C ++ API enables efficient multi-task and memory management. Memory-based operations, such as application context switching, are limited to a minimum. Symbian OS is mainly based on event-driven

It is not a multithreading mechanism. Multithreading can be implemented but should be avoided, because the overhead of each thread system may increase by several kilobytes. On the contrary, a basic event-driven system does not require any applications.

Context switching with only dozens of bytes of system overhead. We have paid special attention to the robustness and reliability design of Symbian OS.

Trackback: http://tb.blog.csdn.net/TrackBack.aspx? PostId = 215841

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.