List Info

Thread: Re: Registering an XMailMergeListener - possible at all?




Re: Registering an XMailMergeListener - possible at all?
user name
2007-03-07 12:31:52
Am Mittwoch, den 07.03.2007, 14:59 +0100 schrieb Christian
Lohmaier:
> > > http://api.openoffice.org/servlets/ReadMs
g?listName=dev&msgNo=11328
> > 
> > But at least it showshow this stuff is expected to
work.
> 
> Yes, the basic-macro already hinted to that... :-(
> 
> I personally think this doesn't make too much sense
then. If you have to
> set up all yourself, then you can do (have to basically
if you want the
> user to be able to choose only parts of the dataset)
the additional step
> to iterate through the database as well and the
mailmergelistener is
> pretty useless/not much of a shortcut then.
> 
> (and indeed the cited sample doesn't use the
mailmergelistener at all)
> 
> I guess I'll just file an issue to have something like
"you need to
> create your own mail-merge to use the listener" to
the docs.

Please do that, it happens that some framework designs from
the
"thinking lab" are conceptually nice and
orthogonal but not well suited
for practically using them.

> > > > From having a quick look at the code at
least the setup of a database
> > > > connection is shown, too.
> > > 
> > > Yes, but this still would require me to write
code to ask the user for
> > > the requested database and to duplicate all
the stuff the current
> > > mail-merge wizard has builtin. (I personally
don't like the wizard at 
> > > all, but I don't want to write one myself
either)
> > 
> > Okay, thinking about it two ideas come to my
mind:
> > 
> > 1. Hacking up^w Improving the wizard
> 
> Honestly, I like the OOo 1.x way much better. No fancy
wizard. Just drag
> the fields into your document where you want them,
optionally add some
> conditions (that's where help from a wizard would come
handy), then
> select the set of rows you want to have included and
fire off the
> mailmerge.

If I'm honest too, I must admit that I'm only rarely using
2.x and never
did use the wizard myself. Isn't it possible to switch that
thing off?
I'll try mail merge on 2.x later on ...

For me 1.1.[3|5] is still working well in most situations.
;)

> Choose whether print/save and maybe offer a way to see
a preview. 
> That is my view of a useful "wizard".

Sounds good, the preview widget is already in the code
somewhere.

On the other hand: you might have choosen the wrong task for
beginners
level.

Marc


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: Registering an XMailMergeListener - possible at all?
user name
2007-03-07 13:44:39
Hi Marc,

On Wed, Mar 07, 2007 at 07:31:52PM +0100, Marc Santhoff
wrote:
> Am Mittwoch, den 07.03.2007, 14:59 +0100 schrieb
Christian Lohmaier:
> > > > http://api.openoffice.org/servlets/ReadMs
g?listName=dev&msgNo=11328
> > > 
> > > But at least it showshow this stuff is
expected to work.
> > [...]
> > (and indeed the cited sample doesn't use the
mailmergelistener at all)
> > 
> > I guess I'll just file an issue to have something
like "you need to
> > create your own mail-merge to use the
listener" to the docs.
> 
> Please do that, it happens that some framework designs
from the
> "thinking lab" are conceptually nice and
orthogonal but not well suited
> for practically using them.

???
Why not add a hint for other users that they cannot use the
mailmerge-listener to hook-up into the existing wizard?
That would save those that come after me the fuzz about
trying with no
success and asking on the mailinglist and waiting for an
answer, only to
get to know that trying with the mailmerge-listener was
wasted time
since it cannot be used that way?

> > > > > From having a quick look at the
code at least the setup of a database
> > > > > connection is shown, too.
> > > > 
> > > > Yes, but this still would require me to
write code to ask the user for
> > > > the requested database and to duplicate
all the stuff the current
> > > > mail-merge wizard has builtin. (I
personally don't like the wizard at 
> > > > all, but I don't want to write one
myself either)
> > > 
> > > Okay, thinking about it two ideas come to my
mind:
> > > 
> > > 1. Hacking up^w Improving the wizard
> > 
> > Honestly, I like the OOo 1.x way much better. No
fancy wizard. Just drag
> > the fields into your document where you want them,
optionally add some
> > conditions (that's where help from a wizard would
come handy), then
> > select the set of rows you want to have included
and fire off the
> > mailmerge.
> 
> If I'm honest too, I must admit that I'm only rarely
using 2.x and never
> did use the wizard myself. Isn't it possible to switch
that thing off?

It is somewhat possible. You must edit your toolbar to add
an icon for
the old mailmerge. The new wizard and the old way have the
same name, so
you have to guess. You cannot add this icon to the
database-beamer
toolbar, you have to add it to the default toolbar.
And even worse: you cannot select the datarows before
launching the
wizard, the selection is lost. Instead the old-style-dialog
will open a
new dialog that has a grid control that showst the
databasetable. There
you can highlight the rows that should be part of the
mailmerge.

> I'll try mail merge on 2.x later on ...

Please do. And you'll shake your head...

> For me 1.1.[3|5] is still working well in most
situations. ;)
> 
> > Choose whether print/save and maybe offer a way to
see a preview. 
> > That is my view of a useful "wizard".
> 
> Sounds good, the preview widget is already in the code
somewhere.
> 
> On the other hand: you might have choosen the wrong
task for beginners
> level.

You got me totally wrong. I do not intend to write a new
wizard. I was
seeking an easy solution to integrate the functionality of
my addon.
Both for me, as well for the user who'll use the addon.

I thought of adding a button "run the merge with the
addon", that would
just launch OOo own's mail-merge wizard, but with the
listener added, so
that I could modify the created documents (but now I know
that this
doesn't work)... Everything else, especially hacking OOo
itself is much
of an effort (and as you wrote yourself: Not something for a
beginner
like me 

ciao
Christian
-- 
NP: Evanescence - Like You

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )