×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Aug 2009
    Posts
    4

    How to get long text input from user

    Hi,

    I need to receive a long text input from the user for the purpose of composing a custom SMS.

    I would like to enjoy all the advantages of a normal form field, specifically the ability of the user to change language and add symbols. This works well on form fields, but the problem is that if I use Form object with a text field - it is limitted to 80 characters. I need to allow input of up to 1600 characters.

    Is there an API in pys60 or an extension / module I can install to provide such a text editor without writing it myself?

    Thanks,
    Michael

    PS - I saw some applications such as Gmail and Opera, in which when you need to enter text (compose Email/search) they give you a standard text input of the phone with all the above available and working. I need to do the same in Python (Pys60) but could not find any way to do so with the available API. I don't know if the above applications are written in Python, but maybe Python has a similar API OR a way to invoke this editor using some bridge to the C++ API.

  2. #2
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: How to get long text input from user

    try the appuifw2 extension

    Code:
    import appuifw2
    text = appuifw2.Text(text=u'', move_callback=None, edit_callback=None, skinned=True, scrollbar=True, word_wrap=True, t9=False, indicator=True, fixed_case=False)
    appuifw2.app.body=text
    documentation is here: http://code.google.com/p/appuifw2/wiki/Text
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  3. #3
    Registered User
    Join Date
    Aug 2009
    Posts
    4

    Re: How to get long text input from user

    Quote Originally Posted by the86hitman View Post
    try the appuifw2 extension

    Code:
    import appuifw2
    text = appuifw2.Text(text=u'', move_callback=None, edit_callback=None, skinned=True, scrollbar=True, word_wrap=True, t9=False, indicator=True, fixed_case=False)
    appuifw2.app.body=text
    documentation is here: http://code.google.com/p/appuifw2/wiki/Text

    I tried to download the sis file but it fails installing on my E71 saying the certificate is not sufficient.

    I tried downloading the source code and installing the appuifw2 as another module in my pys60 sdk dev-module repository but this failed as well - it doesn't recognize that the appuifw2 is installed because the python script expects to find a compiled appuifw2 file and doesn't...

    Anything else I can try?

    Thanks,
    Michael

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: How to get long text input from user

    which version of PyS60 are you using? the one on the google code site is for pys60 1.4.5.

    you could try the native appuifw.Text ...it mite meet your needs, its just i personally prefer to use appuifw2 because of enhanced features.
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  5. #5
    Registered User
    Join Date
    Aug 2009
    Posts
    4

    Re: How to get long text input from user

    Quote Originally Posted by the86hitman View Post
    try the appuifw2 extension

    Code:
    import appuifw2
    text = appuifw2.Text(text=u'', move_callback=None, edit_callback=None, skinned=True, scrollbar=True, word_wrap=True, t9=False, indicator=True, fixed_case=False)
    appuifw2.app.body=text
    documentation is here: http://code.google.com/p/appuifw2/wiki/Text
    Quote Originally Posted by the86hitman View Post
    which version of PyS60 are you using? the one on the google code site is for pys60 1.4.5.

    you could try the native appuifw.Text ...it mite meet your needs, its just i personally prefer to use appuifw2 because of enhanced features.

    I'm using the 1.9.6 version. Would you recommend using the 1.4.5 instead?

    Thanks,
    Michael

  6. #6
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: How to get long text input from user

    for long text input, try this (its off the top of my head though):

    Code:
    import appuifw
    
    #sets the body to receive input
    textwindow= appuifw.Text()
    appuifw.app.body=textwindow()
    .
    .
    .
    #to retreive what was written
    textinput=textwindow.get()

    stick with 1.9.6 .. we need to move on from 1.4.5
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

  7. #7
    Registered User
    Join Date
    Aug 2009
    Posts
    4

    Re: How to get long text input from user

    Quote Originally Posted by the86hitman View Post
    for long text input, try this (its off the top of my head though):

    Code:
    import appuifw
    
    #sets the body to receive input
    textwindow= appuifw.Text()
    appuifw.app.body=textwindow()
    .
    .
    .
    #to retreive what was written
    textinput=textwindow.get()

    stick with 1.9.6 .. we need to move on from 1.4.5
    Well, first - I tried installing 1.9.5 with both the sis (again - it failed saying there is an error with the certificate) and the zip (I placed the files in the repo with a config file and tried to package it - but after installing on the phone - I got the same error message: it is saying that it can't find the module in some zip file it is looking for on c:\\...???

    Second - I know the Text object is not limitted in length yet my problem is that I would like to get the change language and symbol insertion functionality from the phone (since each operator implements it differently according to the native language and 7-bit symbol encoding in his SMSC). So - just using Text won't do it. I need the original SMS editor which is probably available on the C++ interface( I guess) but not in python.

    This really makes things difficult for me - unless there is some other creative way to still use the appuifw Text object but mimic at least the change language option.

    So - I'll ask this: How can I implement a menu option "Change language" that will invoke the change language popup of the phone showing the available languages and change the keyboard language according to the user selection? If I can implement this - it will suffice for my application.

    Thanks,
    Michael

  8. #8
    Regular Contributor
    Join Date
    Sep 2008
    Location
    London, UK
    Posts
    176

    Re: How to get long text input from user

    Quote Originally Posted by softproil View Post
    Well, first - I tried installing 1.9.5 with both the sis (again - it failed saying there is an error with the certificate) and the zip (I placed the files in the repo with a config file and tried to package it - but after installing on the phone - I got the same error message: it is saying that it can't find the module in some zip file it is looking for on c:\\...???

    Second - I know the Text object is not limitted in length yet my problem is that I would like to get the change language and symbol insertion functionality from the phone (since each operator implements it differently according to the native language and 7-bit symbol encoding in his SMSC). So - just using Text won't do it. I need the original SMS editor which is probably available on the C++ interface( I guess) but not in python.

    This really makes things difficult for me - unless there is some other creative way to still use the appuifw Text object but mimic at least the change language option.

    So - I'll ask this: How can I implement a menu option "Change language" that will invoke the change language popup of the phone showing the available languages and change the keyboard language according to the user selection? If I can implement this - it will suffice for my application.

    Thanks,
    Michael
    its been requested... https://garage.maemo.org/tracker/ind...=854&atid=3204
    The86Hitman
    PyS60 1.9.7 on E71
    http://www.drhtailor.com/pys60

Similar Threads

  1. How to have user input string of only digits
    By yqmtooblue in forum Symbian
    Replies: 3
    Last Post: 2007-12-06, 14:33
  2. A large number of text leads to App. closed: lcdui USER 130
    By iloveyiyi in forum Mobile Java General
    Replies: 3
    Last Post: 2007-10-09, 09:33
  3. Urgent! How to change text input language on runtime for EDWIN?
    By whitewinds in forum Symbian User Interface
    Replies: 1
    Last Post: 2007-05-24, 10:37
  4. Long text message in CSmsClientMtm
    By ericyklee in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2007-03-13, 07:45
  5. How to get numeric input from user in Text mode(NOT GUI)???
    By Amit Mahajan in forum Symbian User Interface
    Replies: 4
    Last Post: 2006-04-13, 05:35

Posting Permissions

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