×
Namespaces

Variants
Actions
Revision as of 08:40, 28 June 2012 by hamishwillee (Talk | contribs)

Archived:LCDUI CustomItem content remains blank when appended to a Form before setting the Form as current Displayable (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
Compatibility
Platform(s): S60 3rd Edition, FP1
S60 3rd Edition FP1
MIDP 2.0
Article
Created: User:Technical writer 1 (14 Sep 2007)
Last edited: hamishwillee (28 Jun 2012)

Contents

Overview

A Form containing a CustomItem object is set to be the current Displayable. CustomItem’s content remains blank although it should be visible.

Description

The CustomItem.paint() method is not called when the Form becomes current the Displayable. However, the method will be called when any other paint event will be triggered after the Form gets displayed.


How to reproduce

  Form form = new Form("CustomItem");
MyCustomItem myItem = new MyCustomItem();
 
form.append(myItem);
Display.getDisplay(this).setCurrent(form);

Solution

There is currently no solution. However, the issue can be avoided if Display.getDisplay() is called at least once during the MIDlet’s lifecycle before creating the CustomItem object, e.g. in the beginning of the MIDlet’s constructor.

  Form form = new Form("CustomItem");
Display.getDisplay(this).setCurrent(form);
 
MyCustomItem myItem = new MyCustomItem();
form.append(myItem);
65 page views in the last 30 days.
×