| Reply | « Previous Thread | Next Thread » |
|
Hello ,
Here's below a complete test example for the new infopopup component. Code:
import appuifw
import e32
appuifw.app.title = u'InfoPopUp Test'
appuifw.app.body = appuifw.Text(u'')
l=eval('dir(appuifw)')
positions=[unicode(pos) for pos in l if pos.startswith('EH')]
default_pos=u'default'
pos=default_pos
time1=5000
time2=0
x=0
y=0
pop=appuifw.InfoPopup()
pop.show(u'hello')
def set_menu():
show_popup= (u'Show', cb_show)
choose_pos =(u'Choose pos (%s)'%pos, cb_pos)
choose_time1 =(u'time shown = (%d)'%time1,cb_time1 )
choose_time2 =(u'time before = (%d)'%time2,cb_time2 )
choose_x =(u'x = (%d)'%x,cb_x )
choose_y =(u'y = (%d)'%y,cb_y )
appuifw.app.menu = [show_popup,choose_pos,choose_time1, choose_time2,choose_x,choose_y,menu_exit]
def cb_show():
global pos,time1,time2,x,y,pop
text=u'Hello'
pop.show(text)
def cb_pos():
global pos
ind_pos = appuifw.selection_list(positions)
if ind_pos is not None:
pos=positions[ind_pos]
set_menu()
def cb_time1():
global time1
inp = appuifw.query(u'Enter time in ms','number',time1)
if inp is not None:
time1=inp
set_menu()
def cb_time2():
global time2
inp = appuifw.query(u'Enter time in ms','number',time2)
if inp is not None:
time2=inp
set_menu()
def cb_x():
global x
inp = appuifw.query(u'x (%d)'%x,'number',x)
if inp is not None:
x=inp
set_menu()
def cb_y():
global y
inp = appuifw.query(u'y (%d)'%y,'number',y)
if inp is not None:
y=inp
set_menu()
def handle_exit():
lock.signal()
menu_exit = (u'Exit', handle_exit)
set_menu()
def quit():
lock.signal()
appuifw.app.exit_key_handler= quit
app_lock=e32.Ao_lock()
app_lock.wait()
![]() Nor Exx nor x,y work ![]() Is it a bug (so I'll report it as a bug) or my code is wrong somewhere ? Test it and send me feedback ! Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
I tried running the script on N95, Python 1.4.0. It says 'module' object has no attribute 'InfoPopup'.
Do I need 1.4.1, or an addon or something? |
|
Quote:
InfoPopup is only available with the last version (1.4.1) and only with 3rd edition phones ! So desinstall 1.4.0 and install 1.4.1 It worth it ! Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
Offline
Forum Nokia Champion
|
|
Right. So I tested your code. A small error I got was from
def quit(): lock.signal() instead of app_lock.signal() But positioning doesnt work for me either. Neither does time in miliseconds. I don't know where your code is broken, or if it's because something else. |
|
Quote:
Just Tried your code on my N95 with unsigned 1.4.1 version of python.The exit handler (quit) is not correct as mentioned above and the application can not be terminated correctly. Moreover the pop-up is always shown at the top left corner of the screen when we select show! The note(popup) does'nt even appear in other positions if selected! Also the changing the time is not effective! I also tried changing the initial position of the window by changing values of x and y but doesnt work eitherIts definitely a BuG and should be reported!Best Regards croozeus |
|
Hello ,
Thanks to Bogdan and Croozeus for having testing my script ![]() There were more errors than that ![]() I've forgotten to call show function with PARAMETERS !!! So here's the corrected source code (but no luck it doesn't work for positioning infopopup but time delay now work !) Code:
import appuifw
import e32
appuifw.app.title = u'InfoPopUp Test'
appuifw.app.body = appuifw.Text(u'')
l=eval('dir(appuifw)')
positions=[unicode(pos) for pos in l if pos.startswith('EH')]
default_pos=u'default'
pos=default_pos
time1=5000
time2=0
x=0
y=0
pop=appuifw.InfoPopup()
pop.show(u'hello')
def set_menu():
show_popup= (u'Show', cb_show)
choose_pos =(u'Choose pos (%s)'%pos, cb_pos)
choose_time1 =(u'time shown = (%d)'%time1,cb_time1 )
choose_time2 =(u'time before = (%d)'%time2,cb_time2 )
choose_x =(u'x = (%d)'%x,cb_x )
choose_y =(u'y = (%d)'%y,cb_y )
appuifw.app.menu = [show_popup,choose_pos,choose_time1, choose_time2,choose_x,choose_y,menu_exit]
def cb_show():
global pos,time1,time2,x,y,pop
pos_i=eval('appuifw.'+pos)
text=u'Hello'
pop.show(text,(x,y),time1,time2,pos_i)
def cb_pos():
global pos
ind_pos = appuifw.selection_list(positions)
if ind_pos is not None:
pos=positions[ind_pos]
set_menu()
def cb_time1():
global time1
inp = appuifw.query(u'Enter time in ms','number',time1)
if inp is not None:
time1=inp
set_menu()
def cb_time2():
global time2
inp = appuifw.query(u'Enter time in ms','number',time2)
if inp is not None:
time2=inp
set_menu()
def cb_x():
global x
inp = appuifw.query(u'x (%d)'%x,'number',x)
if inp is not None:
x=inp
set_menu()
def cb_y():
global y
inp = appuifw.query(u'y (%d)'%y,'number',y)
if inp is not None:
y=inp
set_menu()
def handle_exit():
lock.signal()
menu_exit = (u'Exit', handle_exit)
set_menu()
def quit():
app_lock.signal()
appuifw.app.exit_key_handler= quit
app_lock=e32.Ao_lock()
app_lock.wait()
I'm wondering why they release 1.4.1 final ![]() It's plenty of bugs !!! 'final' is not deserved ![]() Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
|
Has been now reported as bug in sourceforge
![]() Cyke64 pys60 1.4.5,1.9.7,pygame,PyS60 CE on E90 , N810 with Python 2.5.2 and ... last PyS60 1.9.7 with touch ui on 5800 ! pys60 extension modules on http://cyke64.googlepages.com/ |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| Aborting the testing | ajitc | Installation, Certification and Security | 1 | 2007-07-27 07:57 |
| Testing Series 60 Application on Emulator with Nokia Testing Suite 1.2 | ramki_23 | Symbian Tools & SDKs | 5 | 2006-05-29 21:21 |
| Testing Project Engineer Opportunity (Mobile), Cambridge, UK | mobile2004 | General Symbian C++ | 0 | 2005-02-17 20:01 |
| Mobile Handset Testing | krishnakanth | General Discussion | 0 | 2004-12-08 03:00 |
| Testing Series 60 Application on Emulator with Nokia Testing Suite 1.2 | ramki_23 | Symbian Tools & SDKs | 0 | 2003-10-08 11:25 |