You Are Here:

Community: Developer Discussion Boards

#1 Old Exclamation Testing infopopup ... - 2007-11-19, 13:46

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
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()
I try it with E61 and N93 it display the popup but I can't position it correctly
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/
Reply With Quote

#2 Old Re: Testing infopopup ... - 2007-11-19, 16:01

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
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?
Reply With Quote

#3 Old Re: Testing infopopup ... - 2007-11-19, 16:26

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
Quote:
Originally Posted by bogdan.galiceanu View Post
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?
@bogdan

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/
Reply With Quote

#4 Old Re: Testing infopopup ... - 2007-11-20, 20:33

Join Date: Oct 2007
Posts: 2,841
Location: Deva, Romania
bogdan.galiceanu's Avatar
bogdan.galiceanu
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.
Reply With Quote

#5 Old Re: Testing infopopup ... - 2007-11-21, 03:21

Join Date: May 2007
Posts: 2,738
Location: 21.46 N 72.11 E
croozeus's Avatar
croozeus
Offline
Forum Nokia Champion
Quote:
Originally Posted by cyke64 View Post
I try it with E61 and N93 it display the popup but I can't position it correctly
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 !
Hi Cyke64

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 either

Its definitely a BuG and should be reported!

Best Regards
croozeus
Reply With Quote

#6 Old Re: Testing infopopup ... - 2007-11-21, 09:41

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
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()
So I'm going to report this as bug.
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/
Reply With Quote

#7 Old Re: Testing infopopup ... - 2007-11-21, 15:21

Join Date: Feb 2005
Posts: 1,353
Location: Belgium (Europe)
cyke64's Avatar
cyke64
Offline
Super Contributor
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 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
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

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