Eguile report templates -- another hurdle
Chris Dennis
cgdennis at btinternet.com
Sun Feb 1 07:23:14 EST 2009
Chris Dennis wrote:
> Hello folks
>
> My project bring HTML templates to GnuCash reports is making good progress.
>
> But I've stumbled on another problem which requires expert knowledge of
> GnuCash and/org Swig and/or Guile.
>
> My evaluated report code can access some Gnucash procedures such as
> gnc:make-html-text, but others such as gncInvoiceGetBook remain 'unbound'.
In fact the error message refers to 'gncinvoicegetbook' as being
unbound, i.e. with the name in lower case. Is that relevant? Guile is
supposed to be case-sensitive unless you tell it not to be.
I can reproduce the problem with this bit of code:
8<--------------
;#!/usr/bin/guile
(define s1 "(abcDEF \"23\")")
(define (abcDEF x)
(display (string-append "This is abcDEF called with " x "\n")))
(with-input-from-string s1 (lambda () (local-eval (read)
(the-environment))))
(read-enable 'case-insensitive)
(with-input-from-string s1 (lambda () (local-eval (read)
(the-environment))))
8<--------------
After setting read to be case insensitive, local-eval tries to call
(abcdef) and can't find it.
I can't find anywhere in the GnuCash code that turns on case-insensitivity.
Does anyone have any idea why this would happen?
cheers
Chris
--
Chris Dennis cgdennis at btinternet.com
Fordingbridge, Hampshire, UK
More information about the gnucash-devel
mailing list