Multiple QofBook support working
linux at codehelp.co.uk
Sun Sep 5 13:49:29 EDT 2004
Using QofSession, I've now got the example program to load two external XML
files, create two separate QofBook structures in memory, access both
simultaneously, compare the QofBook contents and merge the two QofBooks,
complete with user-intervention and collision handling.
The gnc files I've chosen were created with the New File druid in GnuCash
1.8.9 (on MacOSX) - as indicated by the names, one is a simple checkbook
choice, the other a more complex business choice with multiple selections in
There's more to do with the code to better support books with lots of user
data, but it's coming along. On my lowly PIII 700MHz system with not a lot of
free memory, it takes <3 seconds to bring up the user intervention
information - that's loading the engine, the two files, all the comparisons
and the bulk of the total merge workload. Previous problems with GncCommodity
and GncPriceDB are now handled gracefully - until these use QofEntity and
GUID, they are silently ignored by the merge.
example-gncBookMerge is now capable of loading, comparing and merging simple
<path to installed CVS
(Execute in the local directory, in order for the example to locate the
demo GnuCash XML files)
There are small changes to qof_book_merge.c and qof_book_merge.h from the
patch I sent in on Fri, 27 Aug 2004 but the main changes are all in
Shall I wrap the new code into a new patch that encompasses old and new, or is
the older patch soon to be committed?
The modified qof_book_merge.c and qof_book_merge.h have been committed to QOF
CVS at SourceForge. Should show up in the WWW browse info in 24hrs.
All the code is also available at codehelp.co.uk/code/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20040905/f4575fbf/attachment.bin
More information about the gnucash-devel