QSF Import of gncCustomer and gncInvoice

Georgi Mirchev manager at mirchevideas.com
Wed May 31 17:44:56 EDT 2006



Derek Atkins wrote:

> 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.

Actually it is just a declaration of the param type. I do understand 
that the getter doesn't return a QOF_TYPE_CHOICE, nor the setter get a 
QOF_TYPE_CHOICE object. They get/set the real entities from the "allowed 
choice" types.

>
>> 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.

Hopefully my patches won't crash the heck out of GnuCash :-)

>
> -derek
>


-------------- next part --------------
A non-text attachment was scrubbed...
Name: manager.vcf
Type: text/x-vcard
Size: 550 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060531/b67864ca/manager.vcf


More information about the gnucash-devel mailing list