Namespaces
Variants
Actions

Archived:Item.getLabel() Method returns incorrect value on S60 1st Edition (Known Issue)

Jump to: navigation, search
Archived.png
Archived: 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 1st Edition

Article
Created: User:Technical writer 1 (23 Mar 2004)
Last edited: hamishwillee (28 Jun 2012)

Contents

Overview

The Item.getLabel() method doesn't seem to return the correct value for a ChoiceGroup's Label.

Symptoms

The Item.getLabel() method may return a null value, which results in NullPointerException.

Description

There is a known issue in setting the label in ChoiceGroup constructor. A ChoiceGroup (direct subclass of Item) is created as follows:

cg = new ChoiceGroup("ChoiceGroup", ChoiceGroup.EXCLUSIVE, stringOptions, null);

and if the label is queried as follows:

System.out.println("Label: "+cg.getLabel());

</code>

The result is "Label: null." However, the "ChoiceGroup" label is properly visible on the screen.

Solution

If the label is set by using the Item.setLabel() method instead of just using the ChoiceGroup constructor, also the Item.getLabel() method returns the correct result.

This page was last modified on 28 June 2012, at 07:21.
287 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved