| Reply | « Previous Thread | Next Thread » |
|
Hi python experts,
I have used the following piece of code: Code:
import appuifw,e32
app_lock = e32.Ao_lock()
def quit():
app_lock.signal()
appuifw.exit_key_handler = quit
f = open(u"c:\\loc_details.txt","rb")
p = f.readlines()
for x in p:
x = x.replace('\r\n','')
y = x.split(',')
fields = [(u'Location','text',u''+y[0]),
(u'Latitude','text',u''+y[1]),
(u'Longitude','text',u''+y[2])]
flags = appuifw.FFormViewModeOnly
f = appuifw.Form(fields,flags)
f.execute()
e32.ao_sleep(1)
app_lock.wait()
Code:
House,12.924198,77.621949 Office,12.8381576,77.6571918 How to get this done...... Thanks in advance for ur quick responses ![]() |
|
Quote:
I cannot see a timer of 2 seconds which calls a function implemented anywhere in the code. Nor can I see a loop? ![]() |
|
Quote:
I dont know how to change it.. I tried but ended in vain... So someone pls do provide a more clear idea.... |
|
Join Date: Feb 2008
Posts: 2,542
Location: Bhavnagar, Gujarat, India
gaba88
Online
Forum Nokia Champion
|
|
|
Quote:
what you should do is open the file, read its content and display the contents on the screen using a canvas or anything else. Now for making it dynamic you can use the timers which will implement above algorithm for every particular interval. For timers you can search the wiki. Cheers, Gaba88 Gargi Das- http://gargidas.blogsot.com Forum Nokia Python Wiki Learn Python at http://mobapps.org/PyS60 |
|
Thanks gaba........ I tried using timer.. But still not working properly... Can someone fix this and help me resolve it...
It is very urgent......... Code:
import appuifw,e32
timer = e32.Ao_timer()
delay = 1
app_lock = e32.Ao_lock()
def quit():
app_lock.signal()
appuifw.exit_key_handler = quit
f = open(u"c:\\loc_details.txt","rb")
p = f.readlines()
def do_this():
fields = [(u'Location','text',u''+y[0]),
(u'Latitude','text',u''+y[1]),
(u'Longitude','text',u''+y[2])]
flags = appuifw.FFormViewModeOnly
f = appuifw.Form(fields,flags)
f.execute()
for x in p:
x = x.replace('\r\n','')
y = x.split(',')
timer.after(delay,do_this)
app_lock.wait()
|
|
Join Date: Nov 2007
Posts: 317
Location: Sertaozinho/Brazil
marcelobarrosalmeida
Online
Forum Nokia Champion
|
|
HI v divya
I have a code for this in my home but only tonight I can send it to you (I am work). I used a listbox instead. For avoiding flickering, before doing a new set_list() I saved the last selected item so set_list(items,last_selected) will make this flickering less noticeable. Marcelo Marcelo Barros Nokia E71, N800, N95 and XM 5800 http://www.croozeus.com http://wordmobi.wordpress.com http://jedizone.wordpress.com |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| dialog creation dynamically | mallikachand | Symbian User Interface | 1 | 2008-05-15 13:03 |
| Error in displaying calender in nokia N73 | abbaraju | Mobile Java Tools & SDKs | 3 | 2008-03-13 19:14 |
| Displaying file names dynamically | jobin.tech | General Symbian C++ | 9 | 2007-07-17 10:31 |
| Dynamically Adding Controls | Sohil | General Symbian C++ | 6 | 2007-02-20 15:09 |
| Fast Displaying Bitmap | yfho | General Symbian C++ | 2 | 2003-09-26 17:39 |