QSF Import of gncCustomer and gncInvoice
Georgi Mirchev
manager at mirchevideas.com
Wed May 31 17:10:54 EDT 2006
Derek Atkins wrote:
> Quoting Georgi Mirchev <manager at mirchevideas.com>:
>
>> Well, I can see several solutions to this:
>> 1. Make gncOwner first class object
>> 2. Do not make gncOwner first class object, but make a special hack
>> in QSF code for the gncOwner.
>> 3. hmm, running out of ideas - any suggestions :-)
>
>
> I talked with Neil about this.. There was supposed to be a type
> "QofChoice"
> which is a "one of N" type-enum class. Basically, you would define
> "GncOwner" as a "QofChoice{GncCustomer, GncVendor, GncEmployee, GncJob}"
> and then define the getters/setters appropriately.
>
> So in some ways, this is #2 or #3. #1 is wrong is just so many ways.
> Besides, a QofChoice type is useful in other places, too.
>
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.
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).
>> Also any ideas why the INVOICE_OWNER param doesn't have setter?
>
>
> Because QOF isn't finished and the QSF wasn't finished? Other than
> that..
> No particular reason.
>
>> Regards,
>> Georgi
>
>
> -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/cea0b714/manager.vcf
More information about the gnucash-devel
mailing list