BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-02-2007, 12:24 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2007
Model: 8100
Carrier: T-Mobile
Posts: 54
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default SOLVED :: 8100 Issue: Error starting HelloWorld: Symbol 'TextField.<init>' not found.

Please Login to Remove!

Hey There,

Dunno what's wrong with my device, but something seems to have gone wrong.

Below is the simple HelloWorld and I cannot get it to work correctly on my device.

When I compile, and create the .alx, the program works fine on the simulator.

However, after installing on my Pearl I get the following error dialog:

Error starting HelloWorld: Symbol 'TextField.<init>' not found.

I had upgraded the device's OS and later decided I wanted to return the device to its factory state. In doing so, I ran a full wipe of the device using the JL_Cmder program and reloaded the original OS.

Since then, whenever I try to install the Hello World application, I see the following informational message in the BlackBerry Desktop Manager Application Loader Dialog:

Applications to be erased:
BlackBerry API Library

This seems very suspicious to me.

What have I done to my wonderful little Pearl !!!

Below is the simple HelloWorld.java I'm using to get this same error.
=======================================

Code:
package com.rim.samples.device.helloworld;

import net.rim.device.api.system.Characters;
import net.rim.device.api.ui.Screen;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.TextField;
import net.rim.device.api.ui.container.MainScreen;

/**
 * <p>
 * The HelloWorld sample demonstrates some of the most basic features of the RIM
 * UI and internationalization (i18n).
 */
public class HelloWorld extends UiApplication {
	// statics
	// ------------------------------------------------------------------
	public static void main(String[] args) {
		HelloWorld theApp = new HelloWorld();
		theApp.enterEventDispatcher();
	}

	/**
	 * <p>
	 * the default constructor. Creates all the RIM UI components and pushes the
	 * application's root screen onto the UI stack
	 */
	public HelloWorld() {
		pushScreen(new HelloWorldScreen());
	}

}

final class HelloWorldScreen extends MainScreen {

	public HelloWorldScreen() {
		super(Screen.DEFAULT_MENU | Screen.DEFAULT_CLOSE);

		setTitle(new LabelField("Hello World Title", LabelField.ELLIPSIS
				| LabelField.USE_ALL_WIDTH));

		TextField fieldOne = new TextField("Label", "Value");
		add(fieldOne);
	}

	public boolean onClose() {
		Dialog.alert("Closing.");
		System.exit(0);
		return true;
	}

	public boolean keyChar(char key, int status, int time) {
		boolean retval = false;
		switch (key) {
		case Characters.ESCAPE:
			onClose();
			retval = true;
			break;
		}
		return retval;
	}
}

Last edited by mdwheaton : 04-03-2007 at 11:00 AM. Reason: Solved
Offline  
Old 04-03-2007, 10:59 AM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Feb 2007
Model: 8100
Carrier: T-Mobile
Posts: 54
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Solved

Quote:
Originally Posted by mdwheaton
Hey There,

Dunno what's wrong with my device, but something seems to have gone wrong.

Below is the simple HelloWorld and I cannot get it to work correctly on my device.

When I compile, and create the .alx, the program works fine on the simulator.

However, after installing on my Pearl I get the following error dialog:

Error starting HelloWorld: Symbol 'TextField.<init>' not found.

I had upgraded the device's OS and later decided I wanted to return the device to its factory state. In doing so, I ran a full wipe of the device using the JL_Cmder program and reloaded the original OS.

Since then, whenever I try to install the Hello World application, I see the following informational message in the BlackBerry Desktop Manager Application Loader Dialog:

Applications to be erased:
BlackBerry API Library

This seems very suspicious to me.

What have I done to my wonderful little Pearl !!!

Below is the simple HelloWorld.java I'm using to get this same error.
=======================================

Code:
package com.rim.samples.device.helloworld;

import net.rim.device.api.system.Characters;
import net.rim.device.api.ui.Screen;
import net.rim.device.api.ui.UiApplication;
import net.rim.device.api.ui.component.Dialog;
import net.rim.device.api.ui.component.LabelField;
import net.rim.device.api.ui.component.TextField;
import net.rim.device.api.ui.container.MainScreen;

/**
 * <p>
 * The HelloWorld sample demonstrates some of the most basic features of the RIM
 * UI and internationalization (i18n).
 */
public class HelloWorld extends UiApplication {
	// statics
	// ------------------------------------------------------------------
	public static void main(String[] args) {
		HelloWorld theApp = new HelloWorld();
		theApp.enterEventDispatcher();
	}

	/**
	 * <p>
	 * the default constructor. Creates all the RIM UI components and pushes the
	 * application's root screen onto the UI stack
	 */
	public HelloWorld() {
		pushScreen(new HelloWorldScreen());
	}

}

final class HelloWorldScreen extends MainScreen {

	public HelloWorldScreen() {
		super(Screen.DEFAULT_MENU | Screen.DEFAULT_CLOSE);

		setTitle(new LabelField("Hello World Title", LabelField.ELLIPSIS
				| LabelField.USE_ALL_WIDTH));

		TextField fieldOne = new TextField("Label", "Value");
		add(fieldOne);
	}

	public boolean onClose() {
		Dialog.alert("Closing.");
		System.exit(0);
		return true;
	}

	public boolean keyChar(char key, int status, int time) {
		boolean retval = false;
		switch (key) {
		case Characters.ESCAPE:
			onClose();
			retval = true;
			break;
		}
		return retval;
	}
}
Turns out that TextField is part of the 4.2.1 API and not 4.2.0.

I had upgraded my OS to 4.2.1 (Italian release), then downgraded to a 4.2.0 release which broke all my code. It still compiled and installed (strangely), but didn't run.

Thanks for all those who took a look.
Offline  




Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.