gnumed-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Placeholder clarifications - injectable placeholders


From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Placeholder clarifications - injectable placeholders
Date: Fri, 16 Aug 2013 08:46:35 +0200 (CEST)

> Where at
> 
>       
> http://gitorious.org/gnumed/gnumed/blobs/master/gnumed/gnumed/client/wxpython/gmMacro.py
> 
> it reads
> 
> 61    #=====================================================================
> 62    # values for the following placeholders must be injected from the 
> outside before
> 63    # using them, in use they must conform to the "placeholder::::max 
> length" syntax,
> 64    # as long as they resolve to None they return themselves
> 65    _injectable_placeholders = {
> 66            u'form_name_long': None,
> 67            u'form_name_short': None,
> 68            u'form_version': None
> 
> Two questions:
> 
> 1) bearing in mind that, in line 63, it does *not* say
> 
>       "placeholder::::optional-maximum-length"
> 
> must the user be careful that the general case that tolerates the 'optional', 
> as described at
> 
>       http://wiki.gnumed.de/bin/view/Gnumed/GmManualLettersForms#Placeholders
> 
> *** does not apply *** in the case of injectable placeholders, and that -- 
> for reasons of how the coding was done -- there is no way around having to 
> specify, in the case of one of the injectable placeholders:
> 
>       "placeholder::::must-specify-a-maximum length"

While true it doesn't matter to the user unless the user writes
Python code being run by GNUmed.

> 2) where, in line 64, it states
> 
>       "as long as they resolve to None"
> 
> does this simply reflect a convention that was settled upon, within the code 
> to translate and
> pass back to the form instance, in the case of a no-results query for the 
> placeholder in question, the text value  > 'None'

No, it will return the placeholder name so the user can know which
placeholder was not set.

Karsten



reply via email to

[Prev in Thread] Current Thread [Next in Thread]