RE: RE: BitPim 0.8.04 Build
"Simon C" <[email protected]>
| Newsgroups | gmane.comp.mobile.bitpim.devel |
|---|---|
| Message-ID | <000e01c6007f$80eb03d0$6400a8c0@HOME> |
> The idea is to accumulate all of these messages and any
> required user interactivity till after the functions
> have run. They can all be presented in one go before
> the writing actually happens, prioritized with the most
> important issues/messages first.
>
> There is currently no explicit code to support this other
> than having no log access. It is also why existing code
> calls functions wherever possible on the helper so that
> the helper could be upgraded to do the whining and hence
> do it for all Profiles.
Understood, having to click OK 300 times for 300 errors would be a pain,
expecting users to look at a log is unrealistic.
A new class... Allows a list of messages to be created and displayed as one.
Thoughts?
class MultiMessageBox:
def __init__(self, title):
def AddMessage(self, msg):
"""
Add a message to the list of messages to be displayed
Each message appears on it's own line
"""
Def ShowMessage(self, buttons, dont_show_again, max_rows,
max_columns):
"""
Displays the messages in a list in a dialog
buttons: bit mask to choose buttons to be displayed, BT_OK,
BT_CANCEL
don't_show_again: show a checkbox "Don't show this message again"
max_rows: Max visible messages, if number of messages exceed
this a scroll bar will appear
max_columns: Max visible width in characters
returns: tuple of button pressed to exit dialog and "don't show
again" flag
"""
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click