guile docs for gnucash

Brian dol-sen at telus.net
Thu May 19 19:08:16 EDT 2005


On Thu, 2005-19-05 at 12:23 -0400, Derek Atkins wrote:
> Do you properly (export) your variable?  What is the error you see?
> 
> -derek
> 

gnucash: [D] "Running functions on hook "ui-post-startup-hook
  #<procedure business-ui-started ()>
Backtrace:
In unknown file:
   ?:  0* [#<procedure #f ()>]
In /usr/share/gnucash/scm/main-window.scm:
 205:  1* (let* (# #) (letrec # #))
In unknown file:
   ?:  2  (letrec ((changed_cb #)) (gnc:kvp-option-dialog gnc:id-book slots ...) )
    ...
   ?:  3  [gnc:kvp-option-dialog # # "Book Options" ...]
In /usr/share/gnucash/guile-modules/gnucash/gnome-utils.scm:
  26:  4  (let* (# # #) (define # # #) (define # # #) ...)
  26:  5* [gnc:make-kvp-options #<gw:wcp <gnc:id-type> 0xb76a008a>]
In /usr/share/gnucash/scm/kvp-option-registry.scm:
  54:  6  (let ((gen-list #) (options #)) (map (lambda # #) gen-list) options)
  56:  7* [map #<procedure #f (generator)> (#<procedure book-options-generator # >)]
In unknown file:
   ?:  8  (if (null? rest) (map1 f list1) ...)
    ...
   ?:  9  (let ((ret (list #))) (letrec ((lp #)) (lp (cdr ls) ret)))
   ?: 10* [list ...
   ?: 11*  [#<procedure #f #> #<procedure book-options-generator #>]
In /usr/share/gnucash/scm/kvp-option-registry.scm:
  58: 12   [book-options-generator #<procedure dispatch (key)>]
In unknown file:
   ?: 13   (letrec (#) (reg-option #) (reg-option #) ...)
In /usr/share/gnucash/scm/business-prefs.scm:
 106: 14*  [reg-option ...
 107: 15*   [gnc:make-string-option "Business" ...

/usr/share/gnucash/scm/business-prefs.scm:107:4: While evaluating arguments to 
gnc:make-string-option in expression (gnc:make-string-option gnc:*business-label*  gnc:*company-phone* ...):
/usr/share/gnucash/scm/business-prefs.scm:107:4: Unbound variable: gnc:*company-phone*
bash-2.05b$ 



from business-utils.scm:

(define gnc:*business-label* (N_ "Business"))
(define gnc:*company-name* (N_ "Company Name"))
(define gnc:*company-addy* (N_ "Company Address"))
(define gnc:*company-phone* (N_ "Company Phone Number"))
(define gnc:*company-fax* (N_ "Company Fax Number"))
(define gnc:*company-url* (N_ "Company Website URL"))
(define gnc:*company-email* (N_ "Company Email Address"))
(define gnc:*company-contact* (N_ "Company Contact Person"))



(export gnc:*business-label* gnc:*company-name* gnc:*company-addy*)
(export gnc:*company-phone* gnc:*company-fax* gnc:*company-url*)
(export gnc:*company-email* gnc:*company-contact*)


>From business-prefs.scm:

  (reg-option
   (gnc:make-text-option
    gnc:*business-label* gnc:*company-addy*
    "b" (N_ "The address of your business") ""))

  (reg-option
   (gnc:make-string-option
    gnc:*business-label* gnc:*company-phone*
    "p" (N_ "The Phone Number of your business") ""))

 
[/snip]  etc,etc.
I just copy and pasted an existing, then edited each addition.

Once I get this working I'll work on the report side.   Also Is there a way
to make the Company Name input field, etc wider? Our company name has to
scroll thru using the cursor to see or edit what does not show. 

> Brian <dol-sen at telus.net> writes:
> 
> > Is there any documentation of the guile modules?
> >
> > I have been going nuts trying to figure out some of variables, where
> > they are originally defined, etc..
> >
> > To add some business preferences such as company-phone, company-fax,
> > etc. to be used in printing invoices, etc..
> >
> > I have found 2 files so far, business-prefs.scm, business-utils.scm
> >
> > It seems that the variables are first defined in business-utils.scm, and
> > exported from there (no errors generated from there). The
> > business-prefs.scm file is used to feed the preferences dialog.  Opening
> > the Preferences dialog crashes gnucash complaining about an unbound
> > variable.
> >
> > I have grepped thru everything but cannot seem to find out any other
> > clues as to how to proceed.
> 
-- 
Brian <dol-sen at telus.net>



More information about the gnucash-devel mailing list