[izpack-devel] Proposal for Messenger class

Elmar Grom elmar at grom.net
Tue Nov 21 00:51:10 CET 2006


Hi everyone,

a little over a week ago I sent out some messages regarding problems that
some of my customers had overriding files. It is unfortunate but as I guess
you all know there is nothing one can do from inside Java to force the write
of a file if it happens to write protected. Besides, there might be other
reasons for not being able to write a file.

My feeling on this matter is that at the very least we should inform the
user about such things in a proper and comprehensible way. Otherwise it
looks like the installation went fine, if in fact it did not.

While I looked at the issue under the hood, I became aware that the only
facility in IzPack to deal with such issues is the implementation of
AbstractUIHandler. Unfortunately the error messages that are generated are
not detailed and are not localized. From my experience with users of limited
computer related experience I am positive that in most cases error messages
they do not understand are treated as if they never happened. I suppose a
lot of folks simply go by the motto "if it was important they would surely
tell my about it in a way I can understand, therefore anything I don't
understand cannot possibly be important".

I am looking for feedback on the following proposal to deal with this issue

1) implement a singleton class (Messenger) that collects information on
unusual events throughout the installation process. This information might
come from multiple panels. A skeleton for this class is attached.
2) modify the finish panel such, that it queries Messenger and displays a
message appropriate for the situation (i.e. 'Installation Successful' or
'Problems occurred during installation').
3) modify the finish panel to support viewing the details and writing them
to a text file.
4) implement a framework that makes it easy to add localized messages from
anywhere in the code. The messages should also be able to accommodate
variable text, such as file names etc.
5) improve code throughout IzPack to report potential problems.

I could provide (1) and (4) and add reporting for writing of files. (2), (3)
and (5) would require work form other contributors. In addition, there will
probably be several messages that need localizing.

Any feedback is very welcome.

       Elmar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Messenger.java
Type: application/octet-stream
Size: 5757 bytes
Desc: not available
Url : https://lists.berlios.de/pipermail/izpack-devel/attachments/20061120/210310d3/attachment.obj 


More information about the izpack-devel mailing list