×
Namespaces

Variants
Actions
Revision as of 06:59, 22 October 2013 by hamishwillee (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Archived:New line cannot be inserted with '\n' char in Alert using Java ME before S60 3rd Edition FP2 (Known Issue)

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

The article is believed to be still valid for the original topic scope.

Article Metadata
Tested with
Devices(s): S60 3rd Edition, S60 3rd Edition, FP1 devices
CompatibilityArticle
Created: User:Technical writer 1 (10 Dec 2008)
Last edited: hamishwillee (22 Oct 2013)

Contents

Overview

A new line cannot be inserted with the '\n' character in Alerts using Java ME in older S60 Editions.

Description

For text strings in Java ME, a new line can be inserted using the line feed character '\n'.

With S60 Editions up till S60 3rd Edition, Feature Pack 1, the new line is, however, not inserted properly.

How to reproduce

This issue can be tested with a MIDlet using the following code:

    Alert al;
//..
al = new Alert("Hello World Alert!");
al.setString("New\nline"); // this should print text 'line' to next line
Display.getDisplay(this).setCurrent(al);
//..

For the affected devices and S60 Editions, the string will be printed as 'New line' on the same line instead of printing the words 'New' and 'line' on separate lines.

Solution

This issue has been fixed starting from S60 3rd Edition, Feature Pack 2.

This page was last modified on 22 October 2013, at 06:59.
67 page views in the last 30 days.