[Libreoffice] GSoC: Easy Hack: Make python / mail-merge debuggable
timo at iera.de
Sun Apr 10 12:58:10 PDT 2011
I´ve been working on a uno-messagebox for hours. Office just doesnt
output anything and starts to sleep when I execute the mailmerge. Also
there were errors like „XSCRIPTCONTEXT is not defined“. And
com.sun.star.awt.MessageBoxButtons as well as
com.sun.star.awt.VclWindowPeerAttribute do not exist but are used in
examples. These are bugs!
I need an adequate environment to test the script. Always restarting the
office gui is NOT adequate. Otherwise declare python-tk as a dependency
in the libreoffice-mailmerge package and the problem is solved.
Am Samstag, den 09.04.2011, 02:22 +0200 schrieb Timo:
> Is there a way to test the pythonfile within office? At the moment each
> time i kill soffice, restart writer and click
> MessageBox.showMessage() actually doesnt react. May somebody have a look
> at that function?
> Do the nonfree software prefering people see the python output?
> Am Freitag, den 08.04.2011, 14:22 +0100 schrieb Michael Meeks:
> > Hi Timo,
> > On Fri, 2011-04-08 at 14:00 +0200, Timo wrote:
> > > I am applying for the GSoC-project dealing with conversion of
> > > helpfiles.
> > Cool ! :-) good to see your submission.
> > > Before I start that project I like to help with the task to make
> > > mailmerge debuggable.* What action exactly makes office display a
> > > message ?
> > Riight :-) that is tricky; I think this needs to be a GUI thing, since
> > most of our errors seem to happen to end-users who need to be able to
> > debug the problem.
> > > exit() did, raise Exception did, but print did not.
> > Right; and of course we have lots of windows users, who tend to get
> > most of the problems here, and who have no console.
> > > I added a Tk messagebox in the attatched version. This requires python-tk.
> > > Now it prints only the human-readable errormessage-text. What does a
> > > prefered output look like, that can be understood easily by a user?
> > Well :-) I suggest we do two things.
> > First - use the UNO toolkit/ APIs to create and throw up a dialog, and
> > encapsulate this nicely in a python function somewhere;
> > There is some sample code to read before you write your version for
> > this here:
> > http://www.oooforum.org/forum/viewtopic.phtml?t=9602
> > It is hard to use python-tk, since we don't bundle that with
> > LibreOffice, and our python is typically built-in.
> > So - creating a dialog popup function that will show a message and an
> > ok button using the UNO toolkit API would be the first step.
> > From then, I guess we need to work out which pieces are most likely to
> > fail :-) I suppose that testing is the key piece here, you know -
> > dis-connecting yourself while talking to the remote server etc. etc. but
> > I guess the key thing is to get that dialog goodness in there, so we can
> > expand its use over time.
> > Does that make sense ? :-)
> > Thanks,
> > Michael.
> LibreOffice mailing list
> LibreOffice at lists.freedesktop.org
More information about the LibreOffice