QSF Import of gncCustomer and gncInvoice

Derek Atkins warlord at MIT.EDU
Wed May 31 17:26:41 EDT 2006


Quoting Georgi Mirchev <manager at mirchevideas.com>:

> Actually there is a QOF_TYPE_CHOICE. It even seems working, i.e. I 
> have it in my xml and it doesn't segfaults :-)
> I can see that gncOwner doesn't have QofInstance object at the start 
> of it's structure. So if a parameter getter returns a gncOwner into 
> QOF, a segfault will follow. So it seems that all parameters that 
> have type GNC_ID_OWNER should be changed to actually by of type 
> QOF_TYPE_CHOICE.

Yes and no..  The idea is that QofChoice is a template type..  So
a GNC_ID_OWNER would be QofChoice<Customer,Vendor,Employee,Job>.  You
really can't say that it returns a QOF_TYPE_CHOICE because you need to
know what QofChoice template instance is returned.

> Also are these param actually used outside QOF/QSF, i.e. in the rest 
> of gnucash. If not, it will be easier to do the right thing (tm).

These params are used EXTENSIVELY throughout GnuCash.. It's the primary
method for performing queries on objects, and there are lots of assumptions
on the object interactions.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available



More information about the gnucash-devel mailing list