View Single Post
Old 08-01-2005, 06:38 PM   #7
timinator
Knows Where the Search Button Is
 
timinator's Avatar
 
Join Date: Jul 2005
Location: Washington
Model: 8300
Carrier: AT&T
Posts: 29
Default

I just figured it out. Seems that the KeyListener is not needed for the AutoTextEditField.
Here's the working code (for those who are also just getting started):
Code:
import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;
import net.rim.device.api.system.*;
import net.rim.device.api.util.*;
import java.util.*;

// MyTextInput.java Class --------------------------------------------------------------------------
public class MyTextInput extends net.rim.device.api.ui.UiApplication
{
    private AutoTextEditField inputField;
    private LabelField appTitle;
    
    public static void main(String[] args)
    {
        MyTextInput TIinstance = new MyTextInput(); 
        TIinstance.enterEventDispatcher();      
    }
    
    public MyTextInput()
    {
        MainScreen inputScreen = new MainScreen();
        appTitle = new LabelField("Input Test");
        inputField = new AutoTextEditField("Input:","");
        inputScreen.setTitle(appTitle);
        inputScreen.add(inputField);
        pushScreen(inputScreen);
    }

    public void onExit()
    {
        Dialog.alert("Exiting.");
    }
}
Now my next step is to add another edit field, and store the results.
__________________
===================================
"There are 10 types of people in the world.
Those that understand binary and those that don't!"
www.timothytrimble.info - The ART of S/W Development
==================================
Offline