[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Open Office templates
From: |
Jerzy Luszawski |
Subject: |
Re: [Gnumed-devel] Open Office templates |
Date: |
Tue, 2 Sep 2008 22:43:25 +0200 |
User-agent: |
KMail/1.9.7 |
Tuesday 02 of September 2008 12:29:27 pm Karsten Hilbert napisaĆ(a):
> > 'gmForms.replace_placeholders' references data for a
> > placeholder as a handler's property. Exactly the same syntax
> > is used to get data from a dictionary {}.
> >
> > So I can simply do:
> >
> > placeholders_data = {
> > 'operation_diagnosis': node_data['operation_diagnosis'],
> > 'lastname':
> > self.__patient.get_active_name()['lastnames'],
> > 'firstname':
> > self.__patient.get_active_name()['firstnames']
> > }
> > doc.replace_placeholders(handler = placeholders_data)
> >
> > Works like a charm :-)
>
> However, you ain't passing "fixed data" ;-) although you
> don't know that ... The get_active_name() stuff isn't
> immutable ...
Of course. But at the moment of calling replace_placeholders it is fixed. And
it is also fixed (known) before opening a template. So it can be passed to
the procedure opening the template. This is what I meant.
Now I'm happy with this what I discovered.
Thanks.
Jerzy Luszawski