You Are Here:

Community: Developer Discussion Boards

#1 Old Question A note alert with a accept button, or some similar? - 2008-10-29, 18:46

Join Date: Sep 2007
Posts: 3
slezica
Offline
Registered User
Hi to everybody,
We work with Python in Nokia cellphones from a year or two. This forum and wiki is awesome, and everytime we find the answer to our cuestions before ask .
Now, in a project we find some I think standard 'alerts' or 'queries' missing from Python:

a) A simple alert who wait for a user keypress (with a soft-button 'ok' or 'accept').

b) A text-viewer like the used with the license in the installers, (with or without the link support).

Anyone know if is possible do some like this with Python, or we need to 'draw' all with TopWindow?. Is this the right thing?.

What I do for now: Using the appuifw2 (great module, thanks to the author, I like the view approach!), I use the query with soft-button labels assigned for example to 'OK' and ''. BUT... I can´t change the icon.

Is possible, hide or change the icon in a query?.

Really thanks and please excuse my english,

Sebastián Lezica
Dos al Infinito
+54 (11) 4619-1053
Buenos Aires / Argentina
Last edited by slezica : 2008-10-29 at 19:11.
Reply With Quote

#2 Old Re: A note alert with a accept button, or some similar? - 2008-10-30, 23:57

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by slezica View Post
Hi to everybody,
We work with Python in Nokia cellphones from a year or two. This forum and wiki is awesome, and everytime we find the answer to our cuestions before ask .
Now, in a project we find some I think standard 'alerts' or 'queries' missing from Python:

a) A simple alert who wait for a user keypress (with a soft-button 'ok' or 'accept').

b) A text-viewer like the used with the license in the installers, (with or without the link support).

Anyone know if is possible do some like this with Python, or we need to 'draw' all with TopWindow?. Is this the right thing?.

What I do for now: Using the appuifw2 (great module, thanks to the author, I like the view approach!), I use the query with soft-button labels assigned for example to 'OK' and ''. BUT... I can´t change the icon.

Is possible, hide or change the icon in a query?.
Check uiklduges project:

http://code.google.com/p/uikludges/

It offers some of the functionality you require.


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
Reply With Quote

#3 Old Thumbs up Re: A note alert with a accept button, or some similar? - 2008-10-31, 05:33

Join Date: Sep 2007
Posts: 3
slezica
Offline
Registered User
Dear Mikko,
Thanks, your module is excelent!. Your query component is very handy.
Do you have any recomendation about how I can add a timer for autoclose if the user don't answer in X time?. I think in a 'poor man' solution using the ao_timer.after and simulate a keypress.

I mix your long-text with header message query with the edit label procedure of appuifw2 and work very good:

Code:
from appuifw import schedule
from _appuifw2 import command_text
import uikludges as uik

def set_ok_cancel(ok, cancel):
    try: command_text(-2, ok)
    except: pass
    try: command_text(-1, cancel)
    except: pass

schedule(set_ok_cancel, u"Yes, maybe", u"Never")
uik.query(text=u"Some text... "*10, type="message", defval=None, header=u"Title", show_left_softkey=True, tone=uik.ENoTone)
Thanks again, and please excuse my english,

Sebastián Lezica
Reply With Quote

#4 Old Wink Re: A note alert with a accept button, or some similar? - 2008-10-31, 11:12

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
[quote=slezica;494302]Dear Mikko,
Thanks, your module is excelent!. Your query component is very handy.
Do you have any recomendation about how I can add a timer for autoclose if the user don't answer in X time?. I think in a 'poor man' solution using the ao_timer.after and simulate a keypress.
[/code]

This will work, but the proper solution would be retrofit the dialog code to have a timer or asynchronous handling. Can you suggest a particular function and where it should be added?


Mikko Ohtamaa
Twinapex Research
http://www.twinapex.com
Reply With Quote

#5 Old Re: A note alert with a accept button, or some similar? - 2008-10-31, 23:17

Join Date: Sep 2007
Posts: 3
slezica
Offline
Registered User
Quote:
Originally Posted by miohtama View Post
Quote:
Originally Posted by slezica View Post
Dear Mikko,
Do you have any recomendation about how I can add a timer for autoclose if the user don't answer in X time?. I think in a 'poor man' solution using the ao_timer.after and simulate a keypress.
This will work, but the proper solution would be retrofit the dialog code to have a timer or asynchronous handling. Can you suggest a particular function and where it should be added?
I think the async handling is more powerful, but timeout parameter can be simple for use, and enough for most cases.

Maybe the more transparent approach (from the user side) is a module procedure like "cancel_query", who can be called from another thread (or inside a simple timer for example). If this is possible, the notes/queries keep the compatibility to the past. I feel bad because talk is easy compared to DO, I don't know how much complicated can be implement this.

I look in the svn your new addition about progress dialogs, now I'm downloading for view this. Your proyect is like the gold pot at the end of the rainbow! .

Thanks!,

Sebastián
Reply With Quote

#6 Old Smile Re: A note alert with a accept button, or some similar? - 2008-11-03, 10:04

Join Date: Jan 2004
Posts: 368
Location: Helsinki
Send a message via Skype™ to miohtama
miohtama's Avatar
miohtama
Offline
Regular Contributor
Quote:
Originally Posted by slezica View Post
I think the async handling is more powerful, but timeout parameter can be simple for use, and enough for most cases.

Maybe the more transparent approach (from the user side) is a module procedure like "cancel_query", who can be called from another thread (or inside a simple timer for example). If this is possible, the notes/queries keep the compatibility to the past. I feel bad because talk is easy compared to DO, I don't know how much complicated can be implement this.

I look in the svn your new addition about progress dialogs, now I'm downloading for view this. Your proyect is like the gold pot at the end of the rainbow! .

Thanks!,

Sebastián
Check also this:

https://launchpad.net/pys60community



Mikko Ohtamaa
Twinapex Research
http://www.twinapex.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
need information about j2me polish rathikathangaraj Mobile Java General 4 2007-12-19 10:01
Alert confusion Peanuts1971 Mobile Java General 2 2007-05-29 05:40
Fail to build syexpat 1.3 under 2nd FP3 harry_zhang General Symbian C++ 9 2006-07-27 14:19
Waitnote/progress note problems. kamalsinghania General Symbian C++ 0 2005-06-11 05:59
another Null pointer exception kvchen1985 Mobile Java Tools & SDKs 1 2004-06-28 16:33

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 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d81449X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZpythonQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxpythonX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ