Nokia Mobile Internet Toolkit User Guide

0 (0)

Nokia Mobile Internet Toolkit

Version 4.1

User’s Guide

May 2004

Copyright © Nokia 1999-2004. All rights reserved.

This document is for use with the Nokia Mobile Internet Toolkit. Reproduction, transfer, distribution or storage of part or all of the contents in this document in any form without the prior written permission of Nokia is prohibited.

Nokia, Nokia Mobile Internet Toolkit, and the Nokia Connecting People logo are trademarks or registered trademarks of Nokia Corporation. Other product and company names mentioned herein may be trademarks or trade names of their respective owners.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc.

Nokia operates a policy of on-going development. Nokia reserves the right to make changes and improvements to any of the products described in this document without prior notice.

UNDER NO CIRCUMSTANCES SHALL NOKIA BE RESPONSIBLE FOR ANY LOSS OF DATA OR INCOME OR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL OR INDIRECT DAMAGES HOWSOEVER CAUSED.

THE CONTENTS OF THIS DOCUMENT ARE PROVIDED "AS IS". EXCEPT AS REQUIRED BY APPLICABLE LAW, NO WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE MADE IN RELATION TO THE ACCURACY, RELIABILITY OR CONTENTS OF THIS DOCUMENT. NOKIA RESERVES THE RIGHT TO REVISE THIS DOCUMENT OR WITHDRAW IT AT ANY TIME WITHOUT PRIOR NOTICE.

The availability of particular phone products may vary by region. Please check with the Nokia dealer nearest to you.

Visit Forum Nokia (http://www.forum.nokia.com), the site designed for developers using technologies supported by Nokia.

Contents

Introduction ........................................................................................................................................

5

Audience........................................................................................................................................

5

Standards Support .........................................................................................................................

5

Typographical Conventions ...........................................................................................................

5

Related Documents........................................................................................................................

6

Getting Started...................................................................................................................................

7

Features.........................................................................................................................................

8

Launching NMIT ........................................................................................................................

11

Launching NMIT From the Windows Start Menu......................................................................

11

Launching NMIT From a Command Line..................................................................................

11

Menus .........................................................................................................................................

12

File Menu..................................................................................................................................

13

Edit Menu .................................................................................................................................

14

Windows Menu.........................................................................................................................

14

Tools Menu ..............................................................................................................................

15

Preferences .............................................................................................................................

16

Help Menu................................................................................................................................

20

Navigate Using Keyboard Shortcuts .............................................................................................

20

Sending comments to Nokia Corporation.....................................................................................

22

Browsing Editors...............................................................................................................................

23

Browsing Editors for Validatable Content ....................................................................................

24

Editing Features For Validatable Text Content ..........................................................................

25

Editor Window Layout...........................................................................................................

25

Initial Content of the Document Editing Region......................................................................

26

Color Coding .........................................................................................................................

26

Mouse Operations..................................................................................................................

26

XML Element and Attribute Insertion Features.......................................................................

27

Active Buttons........................................................................................................................

30

Revalidate ...........................................................................................................................

30

Show...................................................................................................................................

32

Options...............................................................................................................................

32

Document Summary Bar.........................................................................................................

34

Message Region .....................................................................................................................

34

Validating the Same Content Against Different DTDs.............................................................

35

Displaying a Non-UTF-Encoded Document on Phone SDKs ...................................................

35

XHTML-MP.............................................................................................................................

36

XHTML-MP+CHTML ............................................................................................................

37

WML 1.3 Deck..........................................................................................................................

38

Nokia Mobile Internet Toolkit User’s Guide

1

CSS ...........................................................................................................................................

38

Inserting CSS Property Values.................................................................................................

40

CSS Style Sheet Design and Syntax..........................................................................................

42

Other Browsing Editors ...............................................................................................................

43

WML Script .............................................................................................................................

43

Executing a WMLScript Function...........................................................................................

44

Debugging With the tk_result Reserved Variable ....................................................................

44

WML Script Editor Controls ..................................................................................................

45

WBMP Image ...........................................................................................................................

45

WBMP Editor Toolbar Buttons ..............................................................................................

46

WBMP Editor Draw Modal Control.......................................................................................

48

WBMP Editor Rescale Image Modal Control..........................................................................

48

WBMP Editor Resize Canvas Modal Control..........................................................................

49

Import and Convert JPG and GIF Images to WBMP Format ...................................................

50

Push Editors.......................................................................................................................................

51

Overview of Push Messages .........................................................................................................

52

Encoding and Header Handling in Push Messages......................................................................

53

Saving Push Messages................................................................................................................

53

SI, SL, and CO Editors .................................................................................................................

54

Common Features .....................................................................................................................

54

Headers..................................................................................................................................

54

Active Buttons........................................................................................................................

56

Service Indication (SI) Editor .....................................................................................................

57

Service Loading (SL) Editor .......................................................................................................

59

Cache Operation (CO) Editor....................................................................................................

60

Multipart Message Editor ............................................................................................................

61

Quickly Creating a Multipart Message.......................................................................................

62

Multipart Message Processing....................................................................................................

63

Editing Multipart Headers.........................................................................................................

64

Including Parts ..........................................................................................................................

65

Editing Part Headers..................................................................................................................

66

Part Properties With Content.....................................................................................................

66

Multipart Button Controls.........................................................................................................

67

Saving Multipart Messages ........................................................................................................

67

Messaging Editors.............................................................................................................................

69

Quickly Creating a Multimedia (MMS) Message..........................................................................

70

Overview of MMS Messages........................................................................................................

70

Structure of an MMS Message ...................................................................................................

72

Relationship Between MMS Media Parts ...................................................................................

73

Saving MMS Messages ..............................................................................................................

74

MMS Wizard...............................................................................................................................

74

MMS Message Editor ..................................................................................................................

79

MMS Message Headers .............................................................................................................

80

Parts List ...................................................................................................................................

82

Part Properties...........................................................................................................................

83

Button Controls.........................................................................................................................

84

SMIL Editor.................................................................................................................................

84

Generating an MMS Message From a SMIL File ........................................................................

86

2

Nokia Mobile Internet Toolkit User’s Guide

Generating an MMS Message From Media Parts........................................................................

86

Modifying an Existing MMS Message........................................................................................

87

Modifying Non-SMIL Parts in an Existing MMS Message ......................................................

87

Modifying a SMIL Part in an Existing MMS Message .............................................................

88

DRM Editors ......................................................................................................................................

89

Accessing the DRM Editors..........................................................................................................

90

Creating a DRM Message ............................................................................................................

91

Creating a Forward Lock Message .............................................................................................

92

Creating a Combined Delivery Message .....................................................................................

93

Creating a Separate Delivery Message ........................................................................................

95

Working With Digital Rights .......................................................................................................

96

How SDKs and Phones Apply Digital Rights..............................................................................

97

How Contents and Rights Are Matched.....................................................................................

97

Opening a .dcf File Without an Associated .dr File ..................................................................

99

Opening a .dr File Without a .dcf File .....................................................................................

99

Setting Digital Rights in the DRM Window ...............................................................................

99

Enabling a Permission ............................................................................................................

99

Applying Constraints to a Permission ....................................................................................

100

Exporting Digital Rights........................................................................................................

101

Working With Digital Rights in the Digital Rights Editor ............................................................

102

Creating a New Digital Rights File............................................................................................

102

Opening an Existing Digital Rights File.....................................................................................

102

Setting Options .....................................................................................................................

103

Processing the Rights in XML................................................................................................

103

Creating Re-usable Rights...........................................................................................................

103

Copying Digital Rights................................................................................................................

104

Creating Multiple Rights Files for a Single Content File ...............................................................

104

Creating Multiple Rights Files in the DRM Editor.....................................................................

104

Creating Multiple Rights Files in the Digital Rights Editor ........................................................

104

Saving a Template for the DRM Editor .......................................................................................

105

Download Descriptor Editor..........................................................................................................

107

About Download Descriptors......................................................................................................

107

Creating a Download Descriptor.................................................................................................

108

Testing a Download Descriptor ..................................................................................................

109

Working With SDKs ......................................................................................................................

111

Discovery of Running Phone SDKs..............................................................................................

112

Launching and Closing Phone SDKs............................................................................................

113

Displaying Editor Content on Phone SDKs ..................................................................................

114

Browsing Mobile Internet and File Content .................................................................................

115

Browsing File Content ..............................................................................................................

115

Browsing Mobile Internet Content............................................................................................

115

Using Bookmarks .....................................................................................................................

116

Adding Bookmarks................................................................................................................

116

Editing and Deleting Bookmarks ...........................................................................................

117

DTD Manager .................................................................................................................................

121

DTD Manager Interface..............................................................................................................

122

Nokia Mobile Internet Toolkit User’s Guide

3

DTD Manager Available DTDs Region ....................................................................................

122

DTD Manager DTD Properties Region.....................................................................................

123

DTD Manager Button Controls................................................................................................

125

DTD Manager Task Descriptions ...............................................................................................

125

Registering a New DTD ...........................................................................................................

126

Collecting Required Registration Data...................................................................................

126

Registering a DTD ................................................................................................................

127

Testing Document Content Validity Against Multiple DTDs.....................................................

128

Adding a Module to a DTD......................................................................................................

129

Upgrading a Registered DTD to a Newer Version .....................................................................

130

WAP Gateway ................................................................................................................................

131

Appendix: HTTP File Response Format ........................................................................................

133

Glossary...........................................................................................................................................

135

4

Nokia Mobile Internet Toolkit User’s Guide

Introduction

This guide describes how to use the Nokia Mobile Internet Toolkit 4.1.

Audience

Read this guide if you are a developer of Push, MMS, and DRM messages or of web content for cell phones.

Standards Support

Nokia Mobile Internet Toolkit 4.1, supports WAP and other standards maintained by the Open Mobile Alliance (OMA), as well as other standards maintained by other organizations.

Typographical Conventions

The following typographical conventions are used in this guide:

Notation

Explanation

 

 

Courier

Text that you enter (as opposed to system prompts and responses)

 

File paths

 

Commands

 

Program code

 

 

Italic

• Names of books, documents, and new terminology

 

 

Bold

Names of Windows menus, commands, buttons, and icons

 

 

URL link

Active link

 

 

 

Nokia Mobile Internet Toolkit User’s Guide

5

Introduction

Related Documents

Specifications, that are created and maintained by the Open Mobile Alliance and are freely available at http://openmobilealliance.org.

Assorted documents aboutmessaging technologies are freely available from http:// www.forum.nokia.com/.

Numerous specifications of interest to mobile content developers, notably those relating to XHTML Mobile Profile and CSS, are published by the World Wide Web Consortium (W3C). You may access these at http://www.w3.org/

6

Nokia Mobile Internet Toolkit User’s Guide

Getting Started

Nokia Mobile Internet Toolkit (NMIT) consists of a set of editors that you can use to learn how tto create various types of mobile Internet content. NMIT lets you display this content on multiple phone SDKs.

Phone SDKs are installed separately. NMIT detects installed, supported phone SDKs at startup and lists these in its SDK Control Panel. You can display content you author on any supported phone SDK by simply clicking a Show button within an editor.

Many NMIT editors are used for creating XML-based content types defined by Document Type Defintions (DTDs). These editors employ content validation to check content against a DTD, and they provide features for easily selecting elements and attributions for insertion based on current cursor position. In addition, NMIT provides a DTD Manager through which you can import new DTDs for use by NMIT editors.

This chapter discusses the following topics:

Features Launching NMIT Menus

Navigate Using Keyboard Shortcuts

Nokia Mobile Internet Toolkit User’s Guide

7

Getting Started

Features

Major features of NMIT include:

A set of editors for creating and editing mobile Internet content. These are all accessible using the File>New or File>Open command. Most editors enable the immediate processing and display of content on a phone SDK by pressing a button (Show or Push) within the editor. The following table briefly describes these editors.

NMIT Editors

 

Browsing Editors

Description

WML 1.3 Deck

Create a Wireless Markup Language (WML) document.

 

Supports the WML 1.3 DTD, which conforms to the June

 

2000 WAP specification. Creation of WML 1.2 and 1.1

 

documents is also supported.

WML Script

Create WMLScript content. WMLScript is a derivative of

 

ECMA Script and is used to add programmatic logic to a

 

WML deck, for example, calculations.

WBMP Image

Create a Wireless Bitmap (WBMP) image. Similar to most

 

image editors, the WBMP editor enables the creation and

 

editing of WBMP images, as well as conversion of existing

 

images from GIF and JPEG formats to WBMP format.

XHTML-MP

Create an XHTML document based on the XHTML Mobile

 

Profile DTD.

XHTML-MP+CHTML

Create an XHTML document based on the XHTML Mobile

 

Profile DTD with additional element and attributes taken

 

from Compact HTML.

CSS

Create a Cascading Style Sheet (CSS). The CSS contains

 

formatting style definitions that will be applied to the

 

elements specified in an XHTML document.

Select DTD From List

Create a document based on a selected system DTD, that is,

 

a DTD from a built-in list or one you created yourself.

 

 

Push Content Editors

Description

 

 

Service Indication (SI)

Create a Service Indication Push message, which is sent to

Editor

notify a user of the availability of new content.

Service Loading (SL)

Create a Service Loading Push message, which is sent to force

Editor

a user agent running on the client device to download new

 

content (without notifying the user).

Cache Operation (CO)

Create a Cache Operation Push message, which is sent to

Editor

invalidate specific content in the user agent cache (thus

 

forcing a reload of content the next time the user requests

 

that content).

8

Nokia Mobile Internet Toolkit User’s Guide

Features

NMIT Editors

 

Multipart Message

Create a multipart message, which is a kind of Push message

Editor

consisting of more than one part, each of which is separately

 

processed by the user agent. The editor enables the

 

incorporation and ordering of already existing parts (files)

 

into a single multipart message.

 

 

Messaging Editors

Description

 

 

MMS Wizard

Create a Multimedia Messaging file consisting of one or

 

more parts, each part consisting of text, image, or audio

 

content.

MMS Message Editor

Create or edit an MMS Message. Major features enable you

 

to add, delete, or rearrange media parts; edit MMS headers

 

and individual Part headers; and push the message to

 

selected phone SDKs.

SMIL Editor

Create a Synchronized Multimedia Integration Language file

 

(SMIL and SMIL 3GPP), for specifying the presentational

 

options of an MMS message.

 

 

Deployment Editors

Description

 

 

DRM Editors

Create a DRM message with content and rights to it.

Rights Editor

Edit DRM rights in an XML editor.

Download Descriptor

Create a Download Descriptor, which describes the content

Editor

so a phone user can determine whether the content can be

 

loaded on the phone.

 

 

An SDK Control Panel from which you can select one or more installed phone SDKs upon which to display content from an editor or from the Internet. The panel is a tab in the main window and is shown below. See the chapter titled Working With SDKs for a complete description.

Nokia Mobile Internet Toolkit User’s Guide

9

Getting Started

Several sample applications you can use as aids in developing your own content. These include the content types WML, XHTML, Push, and MMS and are readily available through the File>Open menu, through the Bookmarks button (see above

figure), or in the directory: <NMIT-installation-directory>\samples.

Ease of Use Features, described in the table below:

Ease of Use Feature

Description

 

 

Pop-Up Menus

Many NMIT commands and functions are accessible by clicking

 

the right mouse button.

 

Right-clicking within a window area but not on an individual

 

item will generally display a popup menu of window-level

 

commands, such as Close or Tear off.

 

Right-clicking on an individual item displays commands relevant

 

to that item. For example, right-clicking on an XHTML

 

document displays commands for revalidating the document and

 

for showing the document on phone SDKs. If there are no

 

commands particularly relevant to an individual item, NMIT

 

usually displays window-level commands in the popup menu.

Tool Tips

Tool tips are pop-up text describing the function of an active

 

control. Throughout the NMIT interface, resting the cursor on

 

an active control such as a button or drop-down lists displays a

 

tool tip.

Documentation

The User’s Guide (this manual) is provided in PDF format for

 

viewing using Adobe Acrobat.

Keyboard Shortcuts

NMIT makes navigation and selection functions available

 

through keyboard and keypad presses for those who prefer the

 

keyboard to the mouse. These are described in the section titled

 

Navigate Using Keyboard Shortcuts.

Independent Windows

You can keep multiple documents open and visible

 

simultaneously by "tearing off" a document, that is, detaching it

 

from the main NMIT window so it is an independent window. As

 

an independent window it can be sized, moved, and minimized

 

independently.

 

To tear off a document, right-click in the document window and

 

choose the Tear Off pop-up menu option.

 

To put a torn off document back into the NMIT main window as

 

a tab page, right-click in the document window and choose the

 

Put Back pop-up menu option.

Editor Preferences

Before using an NMIT editor, you may wish to set the available

 

editor preferences such as line numbering, auto-validation, and

 

show warnings.

10

Nokia Mobile Internet Toolkit User’s Guide

Launching NMIT

Launching NMIT

You can launch NMIT from the Windows Start menu or from the command line.

Launching NMIT From the Windows Start Menu

To launch NMIT from the Windows Start menu, choose:

Start>Programs>Nokia Developer Tools>Nokia Mobile Internet Toolkit>NMIT4.1

Launching NMIT From a Command Line

You can launch NMIT by directly executing a .exe or .jar file. Launching from a command line is useful if you wish to launch NMIT programmatically, for example, from within another application.

Launching from the command line is also useful for specifying that one or more files be opened upon launch. These files will be opened in the appropriate NMIT editor, based on file type. Additionally, for all text files listed on the command line, you can specify that they be opened using any of the supported character encodings. In this case, the files will be read using the specified encoding, unless encoding information specified in the content itself (XML-based content only) overrides the encoding you specify.

If you have accepted the NMIT default installation location, the location of the NMIT executable

is: C:\Nokia\Tools\Nokia_Mobile_Internet_Toolkit\bin\Toolkit.exe. In the following

syntax statement, substitute the full path name, such as the above default path, for Toolkit.exe.

Toolkit.exe [-argname argvalue ...] [file ...]

An argument is identified by a required hyphen (-) preceding the argument name. For arguments that accept a value, the value follows the name and is separated by a space. If multiple arguments are specified, a space ( ) is required between each, and between an argument and any specified file parameters. The following are the permitted arguments:

-enc

This argument specifies that any text files listed on the command line be

 

imported into the appropriate NMIT editor (based on file type) using the

 

specified character encoding.

 

This argument must be specified on the command line prior to any files. For

 

example, the following command launches NMIT, opens file1 in the

 

WML editor and file2 in the XHTML editor, and reads both files using

 

the utf-16 character encoding:

 

Toolkit.exe -enc utf-16 file1.wml file2.xhtml

 

Character encodings supported by NMIT are listed in the Default Input

 

Text Encoding list box within the Toolkit Preferences dialog

 

(Edit>Preferences). You may enter any of these encodings as a command

 

line argument.

When you use character encoding as an argument value, the following rules apply:

Nokia Mobile Internet Toolkit User’s Guide

11

Getting Started

The encoding in the file takes precedence over the encoding in Preferences or the command line.

If the file does not specify a character encoding, the encoding in the command line argument takes precedence over the encoding specified in Preferences.

If no encoding is specified in the file or on the command line, the Default Input encoding value in Preferences is used.

You can also launch NMIT from a command line by executing its .jar file. Assuming you accepted the default NMIT installation directory, do the following:

1Navigate to C:\Nokia\Nokia_Mobile_Internet_Toolkit

2Enter the following MSDOS command:

PATH=C:\Nokia\Nokia_Mobile_Internet_Toolkit\bin;%PATH%

3 Enter the following MSDOS command:

java -jar lib\toolkit.jar

If NMIT is not currently running, it will be started. If it is already running, the content is displayed in the running NMIT rather than in another instance of NMIT.

Upon launch, the NMIT Welcome tab is displayed along with the SDK Control Panel:

The Welcome tab provides an overview of NMIT functions. You can drag the bar so that the Welcome section does not display.

Menus

This chapter describes the following six NMIT main menu commands and their submenus.

File Menu

Edit Menu

Windows Menu

Tools Menu

Help Menu

 

 

 

 

12

Nokia Mobile Internet Toolkit User’s Guide

Menus

File Menu

The File menu provides these options:

File Menu Options

New

Displays the Available Content Types dialog from which you can choose

 

a content type for the file you wish to create.

 

After you select the content type and choose OK, NMIT opens the

 

appropriate editor, displaying a default template for the content type.

Open

Displays the Open file for editing dialog from which you can navigate to

 

an existing file that you wish to edit.

 

NMIT opens the appropriate editor for the selected file based on the file

 

type.

Close

Closes the current document and displays the next open document in the

 

NMIT tab order (if there are other open documents).

Save

In an NMIT Editor window, saves an already named file. If the file is

 

untitled, you are prompted for a file name.

Save As

In an NMIT Editor window, opens the Save as dialog into which you can

 

type a file name for the file you wish to save. By default, NMIT supplies a

 

file extension for the file based on the content type.

Save as Template...

In an NMIT Editor window, lets you save the current content so that the

 

editor is initialized with that content when you next create a new file of

 

the same Content Type.

 

To restore a default template, quit NMIT and then delete the template

 

you saved from:

 

C:\Nokia\Tools\Nokia_Mobile_Internet_Toolkit\Templates.

 

Template names are the icon label prepended by New and appended with

 

the Content Type.

 

When you restart NMIT and create new content with the editor, the

 

editor then opens with the default template.

Print

(Text editors only) Opens the Print dialog from which you can print the

 

current document.

Print to HTML...

Opens the Save As dialog which enables you to save the current document

 

in publishable HTML format (text editor only). When such a document

 

is subsequently opened in a browser, it is displayed as it is displayed within

 

an NMIT editor, showing elements and attributes, proper syntax, and

 

color coding.

 

This format is useful for publishing code for review by other content

 

developers or for creating online documentation for programming code.

<various file

Re-opens any of these most recently opened file names. Up to four files are

names>

listed.

Exit

Closes NMIT and all the SDKs started from NMIT

 

 

Nokia Mobile Internet Toolkit User’s Guide

13

Getting Started

Edit Menu

Edit commands are selectively available or unavailable depending on the context. Find, Cut, Copy, and Paste are generally available in Editor windows. Others, such as Undo and Redo are unavailable if you have as yet taken no action. Unavailable commands are grayed out.

Edit Menu Options

Undo

Undo the previous action.

 

Note that NMIT dynamically renames this menu item to reflect what its action

 

will be. For example, if you have performed a paste operation, the menu item is

 

renamed Undo addition. This item is grayed out if there is no previous action.

Redo

Do the action that had previously been undone; that is, undo the last undo.

 

Note that NMIT dynamically renames this menu item to reflect what its action

 

will be. This item is grayed out if there is no previous action.

Cut

Delete the selected text and copy it to the Clipboard.

Copy

Copy the selected text to the Clipboard.

Paste

Paste the contents of the Clipboard at the cursor insertion point.

Find

Opens the Find/Replace Text dialog in which you can specify text to find (and

 

optionally replace) in the current editor window.

 

 

Windows Menu

The Windows menu enables you to view all open documents and provides options for selecting which window is the active window and for tearing off or putting back the active window.

Windows Menu Options

<open

Displays a list of all open documents. Select an open document to bring that

documents>

document to the foreground for editing.

Tear Off

Tears off the active document from the NMIT main window, creating an

<current>

independent window (with a complete menu bar) that can be sized, moved,

 

and minimized independently. This function enables you to view multiple

 

documents simultaneously.

 

To put a torn off document back into the main NMIT window, choose the

 

Windows>Put Back menu item from the torn off window’s menu bar.

 

Both the tearing off and the putting back of document windows can also be

 

accomplished by right-clicking the mouse in a document window and then

 

choosing the desired option from the popup menu.

 

 

14

Nokia Mobile Internet Toolkit User’s Guide

Menus

Tools Menu

The Tools menu provides these options:

Tools Menu Options

SDK Control Panel

Opens the SDK Control Panel tab from which you can choose among

 

available phone SDKs to which you wish to send a document for display.

 

The use of this control panel is described in the chapter titled Working

 

With SDKs.

DTD Manager

Opens the DTD Manager, an NMIT component that enables you to

 

register additional DTDs for use with NMIT content editors (see DTD

 

Manager).

WAP Gateway

Launches Nokia WAP Gateway Simulator (NWGS) if installed on your

 

computer. NWGS is a single-user WAP Gateway based on the multi-

 

user Nokia Activ Server.

 

In order to browse the Internet using a phone SDK, the phone SDK

 

must be configured to use NWGS or an external WAP gateway. If the

 

former, NWGS must be running. This menu option is provided for

 

convenience in launching NWGS.

Preferences

Opens the Preferences dialog, described below.

 

 

Nokia Mobile Internet Toolkit User’s Guide

15

Getting Started

Preferences

Choose Tools>Preferences to open the Toolkit Preferences dialog, which contains the two tab pages General and Text Editors.

The General tab provides settings arranged in the three regions: Startup, Warnings, and Tab Placement, as shown below.

General Tab Options

Startup

On Startup, re-open files that were open

When checked, NMIT reopens files that were open

on previous exit

when you last exited from NMIT.

On Startup, start previously running

When checked, NMIT starts all the SDKs that were

SDKs

running when you last exited from MIT.

On Startup, /Start Nokia WAP Gateway

When checked, NMIT starts the Nokia WAP

Server

Gateway Simulator every time you start NMIT.

 

 

Warnings

 

 

 

 

If checked, NMIT displays compilation errors in a

 

pop-up dialog box, as well as in the message area

 

below the editing window.

 

Unchecking this box disables pop-up display of

 

compilation error messages.

16

Nokia Mobile Internet Toolkit User’s Guide

Menus

General Tab Options

If checked, NMIT displays a warning under these conditions:

• The current WML or XHTML document you show on a phone SDK exceeds the size you specified in the bytes text entry field.

• The size of the compiled content of a WML file saved in binary format exceeds the size you specified in the bytes text entry field.

 

If unchecked, NMIT displays no warnings.

 

This field uses a drop-down list box displaying

 

several existing mobile devices and the size of largest

 

file that can be downloaded to the device.

 

You can choose from the list, or you can enter your

 

own value by selecting the existing value and then

 

typing in a new value.

 

MMS ignores this setting and uses size limits defined

 

for each SDK.

 

 

Tab Placement

 

 

 

Top

Positions document tabs along the top of the display

 

window.

Right

Positions document tabs to the right of the display

 

window.

Bottom

Positions document tabs along the bottom of the

 

display window.

Left

Positions document tabs to the left of the display

 

window.

 

 

Nokia Mobile Internet Toolkit User’s Guide

17

Nokia Mobile Internet Toolkit User Guide

Getting Started

The Text Editor tab provides settings that apply to all text editors in NMIT, including the font and encoding to be used in the display of documents open in a text editor, and initial settings for XML/CSS editors:

Text Editor

Font

Sets the font to be used in the display of text within the content editing

 

region of all text editors. NMIT offers the two font options Default Font

 

and Arial Unicode MS, though the latter is offered only if this font is already

 

installed on your computer. Some differences between these are given below;

 

however, you should choose whichever you prefer.

 

The Default Font is a monospaced font: each character is of the same fixed

 

width. This is the NMIT default font, a sample of which is shown below:

 

The Arial Unicode MS font is a “richer” font than the NMIT default font

 

and contains support for many languages; however, it is not a monospace

 

font. It is recommended to choose this font if your content contains

 

characters from any Asian language. The following code snippet uses the

 

Arial Unicode MS font:

 

When you change a font, the change is seen in documents you open

 

thereafter; documents already open are unchanged.

18

Nokia Mobile Internet Toolkit User’s Guide

Menus

Default Input Use this drop-down list to choose a text encoding that an NMIT text editor Text Encoding will use as the default encoding when reading in a document that you have

chosen to open. Note the following:

Whenever an XML-based document contains a statement specifying its own encoding (the charset attribute in the XML prologue on the first line), NMIT reads in the document using that encoding rather than the encoding specified in the Default Input Text Encoding list.

Some encodings have an identifying signature in the first few bytes. In this case, NMIT may detect that the document uses a different encoding and will then use the encoding it discovers rather than the one you specified in the list.

If the document was specified as a command line argument with the - enc encoding, NMIT uses that encoding.

If the Default Input Text Encoding does not match the encoding used at the time the document was created, the document may appear garbled or unreadable. In this case, close the document and re-open it using a different input encoding. (See the section Preferences for details on how to do this.

NMIT uses the UTF-8 encoding by default.

For additional information, see the section Displaying a Non-UTF-Encoded Document on Phone SDKs.

If checked, line numbers are displayed along the left border in the text editing areas of all the text-based editors.

If unchecked, no line numbers are displayed.

Line numbers in compile error reporting will be displayed even if this box is unchecked.

XML/CSS Editors

If checked, NMIT’s text-based editors revalidate document content automatically at five-second intervals after editing activity stops. This saves you from having to revalidate manually using the Revalidate button in the editor window. This is the default setting. Open files are automatically revalidated, even if this box is unchecked.

If unchecked, automatic revalidation is disabled.

If checked, NMIT’s text-based editors validate the document content against the DTD specified in the DOCTYPE declaration found within the document content. In this case, the parser checks that all elements and attributes are used in accordance with the rules specified in the DTD as well as in accordance with the XML rules for creating “well formed’ content. This is the default setting.

If unchecked, NMIT’s validating parser checks only for “well-formed” XML-based content.

Nokia Mobile Internet Toolkit User’s Guide

19

Getting Started

If checked, the element in which the cursor is currently positioned is highlighted in a light background color.

If unchecked, no highlighting is used to identify current cursor position. This is the default setting.

If checked, non-fatal parser warnings are displayed whenever NMIT’s parser revalidates the document.

If unchecked (the default), no warnings are shown. Errors are always shown no matter what the setting.

Help Menu

The Help menu provides options for accessing NMIT user guide information and release notes:

Help Menu Options

User’s Guide

Opens the Nokia Mobile Internet Toolkit 4.1 User’s Guide (this manual)

(PDF)

in Adobe Acrobat Reader.

Nokia Update

Launches Nokia Update Manager, a small application that enables you to

Manager

easily download and install Forum Nokia software. An Internet connection

 

is required to use Update Manager.

Release Notes

Displays the release notes accompanying this version of NMIT. These notes

 

include version information, changed features, and unresolved issues.

About Mobile

Opens the About Mobile Internet Toolkit dialog, which provides NMIT

Internet Toolkit

version information.

Feedback

Lets you send any comments you have about this product to Nokia

 

Corporation if you have an active Internet connection.

 

 

Navigate Using Keyboard Shortcuts

NMIT provides keyboard shortcuts you can use to navigate and perform operations. These are key combinations that can be used in place of normal mouse operations and are particularly useful if you prefer using the keyboard to using the mouse.

NMIT Windows shortcuts. Use the Windows shortcut ALT+TAB to move input focus from one window to another, for example, to move from the NMIT main window to a “torn off” NMIT editor window. Within the Multipart Editor, use TAB to move input focus from one header field to another. Use CTRL+TAB moves the input focus between window elements such as controls or buttons that you may wish to select.

You can tell that buttons have the input focus by noting an indented rectangular border; text-entry fields are highlighted.

20

Nokia Mobile Internet Toolkit User’s Guide

Navigate Using Keyboard Shortcuts

Menu item shortcuts. To choose a menu item, press the ALT key while simultaneously pressing the letter that is underlined in the menu item name. Once a menu is opened, you can select another item within that menu by pressing the ALT key in combination with the UP or DOWN arrows and then choosing ENTER.

A key combination is executed by holding down the key preceding the plus sign (+) and then pressing the key following the plus sign. In effect, pressing two keys simultaneously.

Keyboard Shortcuts for NMIT Windows

Key Combination

Description

 

 

ALT+TAB

On Windows operating systems, moves focus from one Windows process

 

to another. In NMIT, moves focus from the main NMIT window to a

 

phone SDK or to a torn-off NMIT window.

 

 

ALT+x

On the menu bar, opens the menu whose name contains an underlined x

 

(x).

 

Within a menu, chooses the menu item whose name contains an

 

underlined x (x).

 

 

TAB

Within a window, navigates forward from one control or field to the next,

 

eventually looping back to the starting point. The current position (or

 

“focus”) is indicated by a dotted rectangle.

 

In an editing area, inserts a tab character.

 

 

CTRL+TAB

Within a window, moves focus from inside an editor window to the control

 

buttons and fields on that window but outside the editing area.

 

 

SHIFT+TAB

Within a window, navigates backward from one control or field to the

 

next, eventually looping back to the starting point. The current position

 

(or “focus”) is indicated by a dotted rectangle.

 

 

ENTER

On a button, executes either the default button function or the function

 

having the active focus.

 

In an editing area, enters a carriage return character.

 

 

ALT+ENTER

Within a window, displays the application menu allowing you to move,

 

size, resize, minimize, maximize, or close the window.

 

 

<space bar>

On a button, executes the button function.

 

On a check box, pressing <space bar> checks the button if it is currently

 

unchecked or unchecks it if it is currently checked.

 

When focus is in an editing area, enters a space character.

 

 

<Left arrow>

When a main menu item is open, moves the focus to the main menu item

 

to the left.

 

 

<Right arrow>

When a main menu item is open, moves the focus to the main menu item

 

to the right.

 

 

<Up arrow>

On a menu or one of its menu items, moves the focus to the previous item

 

on that menu.

 

 

Nokia Mobile Internet Toolkit User’s Guide

21

Getting Started

Keyboard Shortcuts for NMIT Windows

Key Combination

Description

 

 

<Down arrow>

On a menu or one of its menu items, moves the focus to the next item menu

 

on that menu.

 

 

PgUp

In an editor window, scrolls one page up.

 

 

PgDn

In an editor window, scrolls one page down.

 

 

Sending comments to Nokia Corporation

You can send any comments you have about this product to Nokia Corporation if you have an active Internet connection by selecting Help>Feedback. Selecting this option automatically opens http://www.forum.nokia.com/feedback where you can enter your comments.

22

Nokia Mobile Internet Toolkit User’s Guide

Browsing Editors

This manual defines a browsing editor as an editor used to create content for display by the browser application of a phone SDK. Note that phone SDKs also have inbox-type applications for handling Push messages and MMS messages. You do not “browse” the Push and MMS content types; these are delivered to you.

Browsers on many phone SDKs can display both WML and XHTML text documents, as well as other content types that are referenced by or invoked within these documents, such as WBMP or GIF images, or, in the case of WML documents, WML Scripts. All of these content types, then, are destined for display or handling by the browser application of a phone SDK, and this manual groups the editors for these content types together under the category “browsing editors.”

Within the category of browsing editors may be found a set of editors that employ a validating parser to check that text content is valid. These validating editors are designed for content that

(1) is XML-based and uses a DTD or (2) employs hierarchical text elements that can be validated for syntax (such as CSS). The two NMIT browsing editors that are not validating editors are the WML Script and WBMP Image editors. The following table summarizes these distinctions among NMIT’s browsing editors.

Validating Editor

Validatable Content

Uses DTD

 

 

 

WML 1.3 Deck

Yes

Yes

XHTML-MP

Yes

Yes

XHTML-MP+CHTML

Yes

Yes

Select DTD From List...

Yes

Yes

CSS

Yes

No

WML Script

Yes

No

WBMP Image

No

No

 

 

 

Nokia Mobile Internet Toolkit User’s Guide

23

Browsing Editors

You can use any of the following methods to open a validating editor, once you have in mind the content type you wish to create:

Choose File>New and then select one of the following icons in the Available Content Types dialog.

Choose File>New, choose the Select DTD From List icon (in the left column below), select the desired DTD from the list showing all currently installed DTDs, and then choose the Open Editor button:

Choose Tools>DTD Manager, select a DTD from the list (same list as in (2) above) in the Available DTDs region, and choose Open Editor.

Choose File>Open and then choose an existing file with one of the following types:

wml, wmls, xhtml, html,wbmp,gif,or css.

Editors for structured content types are functionally similar in the editing facilities they provide. For this reason, they are described together in the section titled Browsing Editors for Validatable Content. The WBMP Image and WML Script Editors are described separately in the section titled Other Browsing Editors.

Browsing Editors for Validatable Content

Recall that a distinction is made between validatable content that is based on a Document Type Definition (DTD) and validatable content which is not. (CSS is the single content type that does not use a DTD.)

This section discusses first the editing features common to all validating editors; secondly, those features used only when editing DTD-based content types; and then concludes with separate discussions of each validating editor.

24

Nokia Mobile Internet Toolkit User’s Guide

Browsing Editors for Validatable Content

Validating editors are editors that operate on any of the following structured content types:

WML 1.3 Deck

XHTML-MP

XHTML-MP+CHTML

CSS

SMIL Editor (The SMIL content type is DTD-based, and SMIL editor features are identical to those of the browsing editors for text content except for the lack of a Show button to display content on a phone SDK. It is discussed in the Messaging Editors chapter instead of here because it is not used to create browsable content.)

Any content type opened using the Select DTD From List menu option (File>New and then the Browsing tab).

Editing Features For Validatable Text Content

This section describes editing features for validating editor.

Editor Window Layout

The following figure shows the major regions in a validating editor:

Text Editing

Region

Message

Region

Active

Buttons

Note the following with respect to the above figure:

Side Panel

Document

Size

Cursor

Position

Document

Encoding

Enter text in the text editing region. The NMIT editor displays a template for the content type you have chosen when you create a new file.

Use the side panel to insert valid attributes for the element highlighted by the cursor in the text editing region and to modify attribute values.

The message region displays validation messages when you save, Show, or Validate a document.

Use the active buttons to validate content, show the document on phone SDKs, or set editing options.

Nokia Mobile Internet Toolkit User’s Guide

25

Browsing Editors

• The document summary displays details about the current document.

Initial Content of the Document Editing Region

Each of NMIT’s supported XML-based content types has an associated template. Therefore, when you open an XML-based content type, the editor is initialized with the associated document template. It is within this template that you begin entering your content. All required elements are already inserted in the editor display, and comments suggest where you might wish to add various new elements.

For an NMIT editor to open an XML-based content type, a unique template for that content type must be installed. NMIT does provide a template file for the pre-installed DTD-based content types. If you wish to install your own DTD, you must provide an associated template file or have NMIT auto-generate a template file. These operations are performed using NMIT’s DTD Manager.

Note that when you open the CSS text editor, which is not XML-based, the text editing region of the editor window displays a sample CSS style sheet. This is helpful in that it shows proper syntax and it may already include tags that you had planned to use.

Color Coding

A validating editor automatically differentiates among recognized data entered. For example, element names are displayed in blue; attribute names, in red; attribute values, in gray; and so on. This makes it easy to visually “parse” the displayed content. Note that colors might vary depending on the configuration of your monitor.

Mouse Operations

The following table describes the possible mouse operations on text in the text editing region:

Single click

• Sets the insertion point.

 

• Upon an element name, displays permissible attributes in the side

 

panel.

 

• Upon an attribute name, highlights that attribute in the side panel.

Double click

• Selects a word, where a word consists of the characters bounded by

 

space or special characters such as the “<“ and “>”.

 

• Upon element or attribute names, also highlights these in the side

 

panel.

Triple click

Selects an entire line.

26

Nokia Mobile Internet Toolkit User’s Guide

Browsing Editors for Validatable Content

Right click

Displays a pop-up menu, whose options vary depending upon whether the

 

document content type is XML-based or CSS. For example:

 

RIGHT-CLICK ON DTD-BASED CONTENT Right-Click on CSS Content

XML

Displays permissible attributes that can be inserted at the cursor position.

 

See the next section titled XML Element and Attribute Insertion Features.

Undo

Undoes the previous text editing operation.

Redo

Performs again the last text editing operation.

Cut

Cuts the selected text to the Clipboard.

Copy

Copies the selected text to the Clipboard.

Paste

Pastes the contents of the Clipboard at the insertion point.

Show on

For XML-based documents only, displays the current document on the

Phone SDKs

currently running phone SDKs. Only phone SDKs you have launched

 

using the SDK Control Panel will receive the document content.

 

Because CSS documents cannot be independently displayed, this option is

 

unavailable for CSS documents.

Revalidate

For an XML-based document, checks that the document is well-formed

 

(correct syntax) and strictly conforming to the DTD.

 

For a CSS document, checks that the document is well-formed (correct

 

syntax).

Close

Closes the document. You will be prompted to save as yet unsaved

 

documents.

Tear Off

Removes the document from the NMIT main window and places it in a

 

separate, independent window.

 

 

XML Element and Attribute Insertion Features

When editing an XML-based document, you need to know which elements, if any, are valid child elements of any given element. As well, you need to know which are the valid attributes that may be inserted within an element. Then, once you have determined which element or attribute you would like to insert, it is helpful to have these inserted for you automatically, using correct syntax and spacing. NMIT provides the following features in support of this:

XML popup menu option

CRL+K key combination

Nokia Mobile Internet Toolkit User’s Guide

27

Browsing Editors

• Side panel

All of these features are available for XML-based documents; however, the XML popup menu is not available for CSS documents. XML-based documents must be valid, however, because menu options displayed are derived from the rules inherent in the DTD. You must successfully revalidate your document before using these automatic insertion features because revalidation maps the cursor text position (where the item gets inserted) to the XML logical structure of the document.

To use any of the above features, first position the cursor by clicking within the current document. For example, in the following figure, right-clicking on the <card> element in the document displays a popup menu within which the top XML menu option changes to <card> Attributes when selected. At the same time, legal attributes of the <card> element are displayed both in a submenu and in the side panel at the far right:

Right-Click on <card>

<card> attributes displayed

<card> attributes displayed in

element or press CTRL+K

in sub-menu

side panel

Note that pressing CTRL+K within the <card> element results in the same popup menu as does right-clicking and choosing the XML submenu option.

To insert an attribute: (1) simply choose it from the submenu using the mouse or (2) use the Up and Down arrow navigation keys to highlight it and then choose Enter. So, in the example shown in the figure above, choosing the class attribute inserts the string class=“ ” and the insertion occurs within the opening and closing brackets of the <card> element.

Both the XML menu and CTRL+K functions operate with sensitivity to cursor position. In the following example, the XML menu option is selected with the cursor position on the blank line below the line containing the <card> element shown in the earlier figure. In this case, the cursor position is outside of the opening and closing brackets of the <card> element (where attributes would be appropriate) but is inside of the opening <card> and closing </card> tags where child

28

Nokia Mobile Internet Toolkit User’s Guide

Loading...
+ 120 hidden pages