Eguile report templates -- another hurdle

Chris Dennis cgdennis at btinternet.com
Fri Jan 30 13:20:20 EST 2009


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'.

My report includes this stuff at the top, which I copied from 
fancy-invoice.scm:

  (use-modules (srfi srfi-1))
  (use-modules (ice-9 slib))
  (use-modules (gnucash gnc-module))
  (require 'hash-table)
  (gnc:module-load "gnucash/report/report-system" 0)
  (gnc:module-load "gnucash/business-utils" 0)
  (gnc:module-load "gnucash/business-core" 0)
  (use-modules (gnucash report standard-reports))
  (use-modules (gnucash report business-reports))

I see that gncInvoiceGetBook is a C routine made available to Guile via 
Swig.  It's available in the main part of report, but not in the 
template code that is evaluated using local-eval and (the-environment).

Is there a reason why C routines such as gncInvoiceGetBook would be 
unavailable in an environment where the likes of gnc:make-html-text work 
as usual?

cheers

Chris
-- 
Chris Dennis                                  cgdennis at btinternet.com
Fordingbridge, Hampshire, UK


More information about the gnucash-devel mailing list