×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    3

    Question TextField on 6230 - extra screen- why?

    Hello!
    I have written a small application with the netbeans visual designer. In a list I make a choice and in a next screen (form with TextField) I enter a number to calculate something.
    The program works perfect on the S40 emulator and also on my 6230.

    The only problem is that on the 6230 in the screen with the TextField I cannot enter a number. I have to press 'change' and then I get to another screen.

    How can I enter a value directly without the extra screen?
    I have tried TextBox displayable from the netbeans toolbox but then my 6230 says "invalid application".

    Tobias.

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: TextField on 6230 - extra screen- why?

    Hi,
    The functionality must not be depends how how you create the module.Well if you have a textfield and is supposed provide the facility that user can enter the values then it must take the values..

    Anyways,at what action you are moving to the second screen - form with TextField..at the time of the action you have to do following tasks -

    @ create the form
    @ create the textfield
    @ append the textfield on the form
    @ set the form as current displayable item.
    @ then your form and the textfield will come into picture..
    @ you can easily enter the values in the textfield.

    According to you, user can not enter the values in the TF..is that throwing the exception...
    Thank,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    284

    Re: TextField on 6230 - extra screen- why?

    Hello Tobias,

    about the Textfield with the Form:
    this is the normal behavior for Forms on these phones. It is inhertited from the time the screens were even smaller. The idea is to make it simple, by always doing just one thing on each screen: the form is to choose the field to edit, and the editing itself is another screen.

    If you have a form with just a textfield, a Textbox is a good option.
    I don't know what went wrong the your Textbox. I guess it is something different you changed. Maybe you activated CLDC 1.1 ?


    Regards

    Karsten Meier

  4. #4
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: TextField on 6230 - extra screen- why?

    Hi,
    What I would say is that first check by developing the same by through the code..

    Thanks,
    Last edited by raj_J2ME; 2008-11-27 at 05:11. Reason: spell
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  5. #5
    Registered User
    Join Date
    Nov 2008
    Location
    New Delhi
    Posts
    11

    Re: TextField on 6230 - extra screen- why?

    can u provide us code wht u wriiteen?





    ~Amardeep

  6. #6
    Registered User
    Join Date
    Nov 2008
    Posts
    3

    Re: TextField on 6230 - extra screen- why?

    Hello guys,

    thanks for the answers. This is part of my source code (syntax is wrong, i have deleted a few rows for easier reading).

    Code:
    private Form mainForm;
    private Form formAnzahl;
    private TextField textFieldAnzahl;
    private List auswahlListe;
    
    public void commandAction(Command command, Displayable displayable) {
            if (displayable == auswahlListe) {
                if (command == List.SELECT_COMMAND) {
                    auswahlListeAction();
                } else if (command == listeBackCommand) {
                    switchDisplayable(null, getMainForm());
                }
            } else if (displayable == formAnzahl) {
                if (command == anzahlOkCommand) {
     	        
    		... //some conversion and calculation with textFieldAnzahl.getString();
    		
                    switchDisplayable(null, getMainForm());//back to main screen
    
    
    public void auswahlListeAction() {
            String __selectedString = getAuswahlListe().getString(getAuswahlListe().getSelectedIndex());
        listIndex = getAuswahlListe().getSelectedIndex();
        //look up some item with index    
    
        //go to form with textfield "textFieldAnzahl"
        switchDisplayable(null, getFormAnzahl());
    
    
    
    public Form getFormAnzahl() {
            if (formAnzahl == null) {
                formAnzahl = new Form("Menge eingeben", new Item[] { getStringItemAuswahl(), getTextFieldAnzahl() });
                formAnzahl.addCommand(getAnzahlOkCommand());
                formAnzahl.addCommand(getBackCommand());
                formAnzahl.setCommandListener(this);
    
            return formAnzahl;
        }
    
    
    
    public TextField getTextFieldAnzahl() {
            if (textFieldAnzahl == null) {
                textFieldAnzahl = new TextField("Anzahl:", "1", 32, TextField.NUMERIC);//GEN-LINE:|40-getter|1|40-postInit
            }
            return textFieldAnzahl;
        }

    @R a j : I feel the code reflects what you say.

    I don't know what went wrong the your Textbox. I guess it is something different you changed. Maybe you activated CLDC 1.1 ?
    I think CLDC 1.1 may be activated. I'll check. But why would that cause the error message?

    Regards,
    Tobias.

  7. #7
    Regular Contributor
    Join Date
    Mar 2005
    Location
    Hamburg, Germany
    Posts
    284

    Re: TextField on 6230 - extra screen- why?

    Hello Tobias,

    that seem to be my mistake, 6230 is a rather old phone, I believed it is CLDC 1.0.

    Nevertheless, if you get the message "invalid application",
    chances are the error is not in the code.
    Wrong specification (Midp 2.1?), build without cleanup, to big jar file, ...
    there are many reasons.
    Watch also the message window of the compile/build if you find something suspect.

    How do you install?

    Form is part of the High Level-UI. You can not change the behaviour of a textfield of a form. If it is really a problem for you, you need to use something different than a form (or a newer phone). If you just begin to develop, I suggest that you leave it as it is, until you got more experience.

    @raj_J2ME
    What I would say is that first check by developing the same by through the code..
    What does this mean?


    Regards

    Karsten Meier

  8. #8
    Registered User
    Join Date
    Nov 2008
    Posts
    3

    Smile Re: TextField on 6230 - extra screen- why?

    Hello,

    thanks, Karsten for pointing me in the right direction. I had MIDP 2.1 activated. After changing it to MIDP 2.0 the TextBox works fine and I will use it instead of TextField.

    By the way, I tried CLDC 1.0 also, but it doesn't support float values.

    Regards,
    Tobias.

Similar Threads

  1. TextField too eager to get out of the way
    By Zigurd in forum Mobile Java General
    Replies: 2
    Last Post: 2005-08-24, 20:06
  2. Full screen splash screen
    By jitendrachhajed in forum Symbian
    Replies: 1
    Last Post: 2005-07-11, 08:01
  3. UI: Full Screen Mode
    By GENERAL_INFO in forum Symbian User Interface
    Replies: 3
    Last Post: 2004-11-22, 06:27
  4. 6230 Buglist
    By misterenigma in forum General Development Questions
    Replies: 6
    Last Post: 2004-07-15, 04:34
  5. how to change Screen from Form to FullCanvas
    By ihadreampp in forum Mobile Java General
    Replies: 3
    Last Post: 2003-08-15, 08:50

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×