Post by Roger BinnsThe 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
"""