Scheme question re: complex report options

Charles Day cedayiv at
Fri Dec 28 01:11:09 EST 2007

I am trying to set up a new boolean report option (a "Notes" checkbox), but
I only want it to be available when one of the other existing boolean
options ("Memo") is already checked (i.e. the "Notes" checkbox should be
enabled only when "Memo" is checked). Using the make-complex-boolean-option
procedure, I was able to get this behavior working, except for one small
problem. If the user clicks the Apply button, the "Notes" checkbox is no
longer affected by clicking "Memo". The two checkboxes have become
completely independent.

You can see a similar result in GnuCash 2.2.2.  Run a Transaction Report,
then click Options. On the General tab, check the Common Currency option.
The Report Currency option (a drop-down) becomes enabled. Click Apply. Now
no amount of clicking or unclicking the Common Currency checkbox will get
the Report Currency drop-down disabled again. It only works properly before
you press Apply.

Am I doing something wrong? Does anyone know how to fix this?  Here is the
Scheme code that sets up the dependency between checkboxes:

    gnc:pagename-display (N_ "Memo")
    "d"  (N_ "Display the memo?") #t
    (lambda (x) (gnc-option-db-set-option-selectable-by-name
         (N_ "Notes")


More information about the gnucash-devel mailing list