| Reply | « Previous Thread | Next Thread » |
|
Hi folks,
I created a module that contains a wrapper for the native wait dialog. Usage: Code:
import e32 from dialog import wait dlg = wait(u"Hello Wait note :)") e32.ao_sleep(3) dlg.close() ![]() As usual, you can find the files on my share http://students.oamk.fi/~dlefevre/thesis/index.php/dlm Any bugs reports are welcome and suggestions to make it better. B.R LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
Quote:
Fortunately I found it in the sisx file ![]() Why this dialog has 30-character limitation ? I don't find 'close' method in the wait class Could you explain where is this function ???I think that PyS60 use Upper case for the first letter of all classes like Text , Canvas etc. so wait could be Wait ... Keep up the great job (I'm waiting for the progress dialog If you want to see a dialog example look at here ! ![]() 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/
Last edited by cyke64 : 2007-02-06 at 15:31.
|
|
Hi cycke64
![]() Nice feedback! Quote:
Quote:
Quote:
Code:
import e32
if e32.s60_version_info>=(3,0):
import imp
_dialog = imp.load_dynamic('_dialog', 'c:\\sys\\bin\\_dialog.pyd')
del imp
else:
import _dialog
del e32
class wait( object ):
def __init__( self, aString):
# accepts only 30 characters or user panic
if len(aString) > 30:
self._iDlgRef = _dialog.wait( aString[:27]+"...")
else:
self._iDlgRef = _dialog.wait( aString )
# the object is closed then deleted
def close( self ):
del self._iDlgRef
del self
Quote:
![]() Quote:
Thanks for reading the journal ![]() Well done and thanks! I'll make a post for the next release LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
hello again
Thanks for your reply I think about other upgrades for your nice module - You mix class and function in the same Wait I think it's better to use class instance and AFTER with another method show() displaying widget like in TopWindow class or the execute from Form class !So the code becomes like this : Code:
import e32 from dialog import Wait dlg = Wait(u"Hello Wait note :)") # create object and init dlg.show() # display wait widget on screen e32.ao_sleep(3) dlg.close() # hide wait widget 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/ |
|
Hi cycke64
Quote:
Also I could understand the advantage of using the top window behavior that could allow the user to define at the beginning of their application all dialogs they want to use and then bring them when they want with show() and close() ... I just arbitrary decided for now to have it with the note behavior and that's why if you read the source you see one class with only a constructor and a destructor ![]() Making the modification would take few minutes to have a top window style. So what shall we do? A vote? The point of view from PyS60 team would help quite much too!Waiting for some more feedback from you LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
I have a problem with wait dialog.
I tried it out in file upload/download like this: Code:
try:
dlg = dialog.wait(u"viestit haetaan...")
lists = self.get_messages(params)
dlg.close()
...
Is there some way to prevent this? I would really like to use the progressbar when it comes out... |
|
How about this?
Code:
dlg = dialog.wait(u"viestit haetaan...")
try:
# get_messages() may fail and raise an exception.
lists = self.get_messages(params)
finally:
dlg.close()
|
|
Hi leban,
Try this: Code:
dlg = dialog.wait(u"viestit haetaan...")
try:
lists = self.get_messages(params) # here you have an error
except:
pass
dlg.close()
...
LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
It worked. Kiitos.
|
|
Ole hyvä
![]() LFD Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
Quote:
I think this is un forum en langue anglaise ? ![]() 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/ |
|
I have another problem with wait dialog. This time with close()
I made a dummymodule for installations without dialog-module. Code:
class dummydialog:
def __init(self):
pass
def wait(self, note):
appuifw.app.title = note
pass
def close(self):
pass
try:
import dialog
except:
dialog = dummydialog()
Some help? PS. Universal default language = bad english :-) |
|
Quote:
Code:
class dummydialog:
def __init(self):
pass
def wait(self, note):
appuifw.app.title = note
return self # This line changed.
def close(self):
pass
|
|
I would use 2 classes for that because you could do
Code:
from dialog import wait Code:
class wait:
def __init__(self, aNote):
# here you put the note you want
appuifw.app.title = note(aNote, 'info', 1)
def close(self):
# do what you want for closing, probably nothing
pass
class dummydialog:
def __init__(self):
pass
def wait(self, aNote):
return wait(aNote) # This line changed.
Code:
try:
import dialog
except:
dialog = dummydialog()
waitDlg = dialog.wait(u'Hello dummy dialog :)')
waitDlg.close()
Code:
try:
from dialog import wait
except:
pass
waitDlg = wait(u'Hello dummy dialog :)')
waitDlg.close()
Devices: Nokia E61 3rd Edition - pys60 1.4.0 Tips and modules: http://www.lfdm.net/thesis |
|
I fixed it using the suggestion that required the least changes to my code.
Thanks again. |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| App in Background and Wait Dialog | ianratcliffe | General Symbian C++ | 1 | 2006-02-22 04:46 |
| How can i dynamic switch text of global wait not or wait dialog | Chris.Li_Nokia | General Symbian C++ | 4 | 2005-11-10 07:13 |
| Wait Dialog that works ! But ... | valentin_da_itiv | General Symbian C++ | 7 | 2004-07-01 18:44 |
| Wait dialog vs. Global note - problems... | bjorn.rudolfsson | Symbian User Interface | 4 | 2003-10-30 11:48 |
| Wait dialog vs. Global note - problems... | bjorn.rudolfsson | General Symbian C++ | 0 | 2003-06-25 16:40 |