×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    28

    the cursor is unavailable in TextField on Nokia device

    Hi all,
    I use setString to set the data in TextField, but the cursor is always at the begin of TextField,why?
    I test it on S40 and windows mobile and nokia 5300,that's ok, but the cursor is always at the begin of TextField when i try to setString("123") on Nokia device(S60 2nd, S60 3rd fp1 N73,E61...)

    here is my test code:

    TextField inputField = new TextField("", "123", INPUT_LENGTH, TextField.PHONENUMBER);
    form = new Form("Test");
    form.append(inputField);

    //the cursor is at the begin of "123"

    inputField.setString("4567");

    //thecursor is at the begin of "4567"

  2. #2
    Regular Contributor
    Join Date
    Aug 2006
    Posts
    307

    Re: the cursor is unavailable in TextField on Nokia device

    TextFields on the S60 platform are supporting the direct editing, while on the S40 platform they don't.

    If you're using TextFields only for displaying the data, use the textField.setConstraints(TextField.UNEDITABLE) method in order to disable the cursor.

  3. #3
    Registered User
    Join Date
    Apr 2006
    Posts
    28

    Re: the cursor is unavailable in TextField on Nokia device

    Thanks axs.
    But i need to edit and also i want to update the data in TextFields sometimes,ofcourse the cursor should be at the end of the data when i update the TextFields.Unluckily,the cursor always at the begin of the data!
    I test on these devices:

    S40 ----> ok
    N73 ----> Error
    N90 ----> Error
    N91 ----> Error
    E61 ----> Error
    N5300 --> ok

    So it seems an issue on the version before S60 3rd Edition fp2,right?

    Is there any APIs can set the cursor myself?



    Quote Originally Posted by axs
    TextFields on the S60 platform are supporting the direct editing, while on the S40 platform they don't.

    If you're using TextFields only for displaying the data, use the textField.setConstraints(TextField.UNEDITABLE) method in order to disable the cursor.

  4. #4
    Registered User
    Join Date
    Dec 2005
    Location
    Brazil
    Posts
    1,884

    Re: the cursor is unavailable in TextField on Nokia device

    Hi sungodjava,

    "Is there any APIs can set the cursor myself?"
    AFAIK the only method available allows you to get the current caret position, not to set it.

    public int getCaretPosition()

    Note its description from the javadocs:

    Gets the current input position. For some UIs this may block and ask the user for the intended caret position, and on other UIs this may simply return the current caret position.

    Best,
    Juarez Alvares Barbosa Junior - Brazil

  5. #5
    Registered User
    Join Date
    Apr 2006
    Posts
    28

    Re: the cursor is unavailable in TextField on Nokia device

    Thanks juarezjunior,
    Yes i know getCaretPosition() API, so i want to set the cursor myself.
    But i can not find this issue in the known issues!!
    Hope it's ok on the latest devices.

    Thanks all of you.

    Quote Originally Posted by juarezjunior
    Hi sungodjava,

    "Is there any APIs can set the cursor myself?"
    AFAIK the only method available allows you to get the current caret position, not to set it.

    public int getCaretPosition()

    Note its description from the javadocs:

    Gets the current input position. For some UIs this may block and ask the user for the intended caret position, and on other UIs this may simply return the current caret position.

    Best,

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    2

    Thumbs up Re: the cursor is unavailable in TextField on Nokia device

    Try this way
    call setString() before appending the textfield item in the form.
    Cursor will be avialable then.

    Cheers,
    Mohu.

Similar Threads

  1. Infra-red capability
    By Symbian_Challenge_0412 in forum General Development Questions
    Replies: 1
    Last Post: 2005-08-16, 18:24
  2. Series 60 Concept Emulator (SDK Beta 0.2 Linux) not working
    By mattbee in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2003-06-10, 11:43

Posting Permissions

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