qof_book_merge first release

Neil Williams linux at codehelp.co.uk
Sat Oct 16 10:45:58 EDT 2004


On Saturday 16 October 2004 4:05 am, you wrote:
> Hi,
>
> Sorry for taking so long to get to this patch.

It's fine, honest. I've got lots on with other projects and you're always busy 
on the lists too. Plus there's a lot in the patch to get through!

> I was just looking at it to commit it to CVS but I'm a little
> concerned about making GncAddress a first-class QOF type.

Sorry, it's an oversight on my part. Part of local changes made during 
development and incorrectly reversed.

> four places.  Granted, this was written well before QOF was started,
> so perhaps we might need to reexplore that design decision.
>
> I guess my main concern is the definition of the QofObject around an
> address.  Are you sure you need it?  If so, why?

No, it's not needed. I'm not at all convinced that I've got GncAddress right - 
I will review it because this is something I didn't intend. 

gncAddressSetParentEntity may or may not be useful later, as yet it is unused.

My intention was to allow access to the other address fields, rather than just 
name, phone, fax and email, to include address one, two, three and four as 
well. Adding the QofObject definition was unnecessary.

The additional create function gncAddressCreate_q is unnecessary for the same 
reasoning - it would require a gncAddress QofInstance or GUID to work. I had 
been working on this in the early stages of the merge code development - I 
was trying to see how an address would be created if the QofEntity *parent is 
not known at the time of the creation. I need to review the whole area.

Can you just apply these changes, instead?
+    { ADDRESS_ONE,             QOF_TYPE_STRING, 
(QofAccessFunc)gncAddressGetAddr1, (QofSetterFunc)gncAddressSetAddr1 },
+    { ADDRESS_TWO,             QOF_TYPE_STRING, 
(QofAccessFunc)gncAddressGetAddr2, (QofSetterFunc)gncAddressSetAddr2 },
+    { ADDRESS_THREE,   QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr3, 
(QofSetterFunc)gncAddressSetAddr3 },
+    { ADDRESS_FOUR,    QOF_TYPE_STRING, (QofAccessFunc)gncAddressGetAddr4, 
(QofSetterFunc)gncAddressSetAddr4 },

Sorry to make more work for you.

-- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-patches/attachments/20041016/576592bc/attachment.bin


More information about the gnucash-patches mailing list