You Are Here:

Community: Developer Discussion Boards

#1 Old Help with first app please - 2007-01-22, 08:40

Join Date: Jan 2007
Posts: 16
NeilG
Offline
Registered User
Dear programmers

I am not a programmer, but have a desperate need for a simple app to run on my E61.

I am able to display Thai fonts in any app, but cannot type them.

I installed Lao Unicode Fonts to e:\resources\fonts and am now able to read Lao documents in the built in doc editor (I think it is a variant of quickword).

The simple app in question is to be enable me to enter Lao characters in Python and copy and paste them into quickword. I am able to enter Lao characters one-by-one using a simple Python script. The characters show up as little squares in Python, but display perfectly when copied and pasted into quickword.

Using Jurgen’s excellent tutorial (piecing code together) I have managed to come up with something that meets my needs, using

index =
appuifw.selection_List(choices=L, search_field=1)

My problem is that each time a character is entered the app stops. I have tried adding

While running:

At different sections of the code without success.

I would like the selection list to keep displaying as I select the characters and print them until I exit the list to copy the text and paste it in quickword.

One other issue is that each time a character is entered it is automatically followed by a carriage return. What is the Python backspace command?

I realize that I should be reading-up and trying to help myself more, but at the moment I do not have the time, but intend to later.

The way I am implementing this probably seems a crazy way to do it. It would be much better to read the keyboard presses and convert them before they get printed, but I haven’t a clue where to start. The way it is implemented at the moment would actually work quite well as I have to press at most, two keys to get any single Lao character.

I have attached the code below and would be very grateful if someone on the message boards could have a look at it and tell me where to add the

While running:

And also how to add an editable canvas (if possible display the Lao characters instead of the little squares) and add the auto backspace after the character is printed.

Thank you for your patience!

The code follows:

# Copyright (c) 2006 Jurgen Scheible
# Application skeleton with main loop (while loop)

import appuifw
import e32

# create your application logic ...

L = [u'ko kay', u'kho khai', u'kho khwai', u'ngo ngua', u'jo jok', u'so tam', u'nyo nyung', u'do dek', u'to ta', u'tho sung', u'tho tam', u'no nok', u'bo be', u'po pa', u'pho sung', u'fo tam', u'pho tam', u'fo sung', u'mo maew', u'yo ya', u'ro rot', u'lo ling', u'wo wi', u'so sung', u'ho sung', u'o ang', u'ho tam', u'A', u'MAI KAN', u'AA', u'AM', u'I', u'II', u'Y', u'YY', u'U', u'UU', u'MAI KON', u'semi LO', u'semi NYO', u'E', u'EI', u'O', u'AY', u'AI', u'KO LA', u'MAI EK', u'MAI THO', u'MAI TI', u'MAI JATAWA', u'KARAN', u'NIGGAHITA', u'HO NO', u'HO MO']

running=1

def quit():
global running
running=0

appuifw.app.exit_key_handler=quit

appuifw.app.title = u"running"

# appuifw.app.body= ...

index = appuifw.selection_list(choices=L, search_field=1)

if index == 0:
data = 0x0E81
print unichr (data)
index
elif index == 1:
data = 0x0E82
print unichr (data)
# the remainder of the Lao unicodes to be added later
else: print "not found"

while running:

e32.ao_yield()
Reply With Quote

#2 Old Re: Help with first app please - 2007-01-23, 11:33

Join Date: Jan 2007
Posts: 16
NeilG
Offline
Registered User
I managed to work it out, except for moving the cursor back (or entering a backspace).

Cheers
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenGL ES app is not trusted mribble Installation, Certification and Security 7 2006-11-03 23:48
App crash problem - how to figure out why? neomedia General Symbian C++ 1 2005-02-07 17:22
Dialog's clipping area (again). Nokia experts, please help synov Symbian User Interface 0 2004-06-26 15:35
7650 - go back, close my app not closing the container app geran Digital Rights Management & Content Downloading 1 2002-12-05 10:58
Launching an app from pJava.. krajag PersonalJava 0 2002-10-10 20:57

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia