FreqSpec and SchedXaction as QOF objects

Neil Williams linux at codehelp.co.uk
Sat Apr 23 10:19:40 EDT 2005


On Saturday 23 April 2005 2:44 pm, Derek Atkins wrote:
> I would do it similar to the way the GncAddress is done.  It's still
> a second-class object (i.e. you cannot have a FreqSpec on its own)
> but you still have consolidated code to perform the import/export
> of the FS sub-object...

It's currently only GnuCash that puts limits on top level and sub objects and 
it gets confusing sometimes. Certainly, within GnuCash there should not be 
GncAddress or FreqSpec objects on their own - they simply won't get written 
out by the normal backends. However, when QSF can deal with partial QofBooks 
and as QOF itself is being used by more applications, there is every reason 
to have QSF files that contain address entries with no other data - these 
wouldn't be GncAddress objects though, they would be pilot-datebook etc.

I think I can ensure what you want in GnuCash by having a parent reference in 
the sub-object (already there in most cases) and by always explicitly setting 
the export code to deal with top level objects only, wrapping sub objects 
inside. e.g. if GncCustomer is exported, a GncAddress is included but 
GncAddress itself isn't put into the list of possible exports. This would be 
a convention of the export code rather than a rule within QOF itself.

I may have to investigate how to lay out such rules for new objects - if that 
generic export dialog is to be workable QOF will need some way of "hiding" 
GncAddress within GncCustomer.

Maybe a new part of QofObject declarations:

parent: NULL
or
parent: GNC_ID_CUSTOMER
?

> Also, when you make these changes you should make them to only HEAD
> __OR__ g2.  Pick one and stick with it.

Ah, sorry about that. That was the qof_book_merge.c char handling code, yes? I 
had to revert a change that I made in HEAD some time ago but which didn't get 
into G2 properly.

Won't happen again.

Wouldn't this be easier if GnuCash used QOF as a library?

> Beyond all that, I have no problem with QOFizing FS and SX.

Thanks. I'll get right to it.


-- 

Neil Williams
=============
http://www.dcglug.org.uk/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- 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-devel/attachments/20050423/a3d108af/attachment.bin


More information about the gnucash-devel mailing list