After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 599953 - gnc:make-[complex|simple]-boolean-option doesn't store its value
gnc:make-[complex|simple]-boolean-option doesn't store its value
Status: RESOLVED FIXED
Product: GnuCash
Classification: Other
Component: Engine
git-master
Other All
: Normal normal
: ---
Assigned To: Derek Atkins
Derek Atkins
Depends on:
Blocks: 537476
 
 
Reported: 2009-10-28 21:15 UTC by Mike Alexander
Modified: 2018-06-29 22:30 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch to store boolean options as a string (813 bytes, patch)
2009-10-28 21:15 UTC, Mike Alexander
committed Details | Review

Description Mike Alexander 2009-10-28 21:15:05 UTC
Created attachment 146451 [details] [review]
Patch to store boolean options as a string

Neither gnc:make-complex-boolean-option nor gnc:make-simple-boolean-option
(which calls it) correctly stores its result in the KVP that it is using.  This
is because it calls kvp-frame-get-slot-path-gslist and
kvp-frame-set-slot-path-gslist to get and set the value.  Both of these are
implemented in C and the code in kvp-scm.c can't convert a Scheme boolean value
to or from a KvpValue since there is no boolean type in KvpValue.  There are
already a few places that have comments suggesting that there should be a
KVP_TYPE_BOOLEAN type, but adding this would be non-trivial.  For now I'll
supply a patch that will store the boolean value as a string (which is what
code in xaccAccountSetAutoInterestXfer in Account.c does).
Comment 1 Christian Stimming 2009-10-31 21:04:13 UTC
Comment on attachment 146451 [details] [review]
Patch to store boolean options as a string

r18404 (with comment lines added by me), thanks a lot!
Comment 2 John Ralls 2018-06-29 22:30:10 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=599953. Please update any external references or bookmarks.