QSF Exports

Derek Atkins warlord at MIT.EDU
Tue Mar 8 11:07:46 EST 2005


Neil Williams <linux at codehelp.co.uk> writes:

> On Tuesday 08 March 2005 2:52 pm, Derek Atkins wrote:
>> Neil Williams <linux at codehelp.co.uk> writes:
>> > I'm planning a cover-all export dialog that will use a notebook (tabbed)
>> > style interface - one tab for each supported GnuCash entity. Accounts,
>> > Transactions, Invoices, Customers, Vendors, Employees (any others?)
>>
>> All I can say is that you had better make sure the pages are pluggable
>> when some module adds a new data type.
>
> You do mean object type? As in Account rather than a data type like "string"?

Yea..  I kind of use "data" and "object" interchangably.  Appologies.
I did really mean "objects" (ala Account, Invoice, Customer, etc.)

> Yes, I had planned for new objects. By using tabs vertically on the left, it's 
> easier to fit in more objects. I estimate I can fit in another 6 before the 
> dialog becomes any larger. Thereagain, it'll only show objects that exist in 
> the current book. Naturally, during testing, this is hardcoded but I'd do it 
> this way:
>
> Add new tabs at run-time using gtk_notebook_append_page (), generate the list 
> of pages from qof_object_foreach_type and the page contents from 
> qof_class_param_foreach - no entities, no page, no tab to add.

Ahh, Excellent!!!  So you HAVE thought of it.  Great!

> Maybe. It's v.early days for this little bit. Maybe it'll grow into a druid 
> that separates objects like Accounts from business objects like Invoice, 
> maybe it'll get so complex I'll have to split some modules out into their own 
> dialogs. Realistically, the full version of this may not make the release of 
> G2, it may need to be the release after.
>
> The entire QSF/book_merge code can have new data types added, just not at 
> runtime! I've done what I can to make the framework as extendable as 
> possible. 
>
> New objects are not a problem for any part of the framework. Compile a new 
> object in, register it with QOF and it'll work. It's regularly tested using 
> non-GnuCash objects.
>
> New data types can be supported with a few additions to the code, like how to 
> compare two values, conversion to strings and from strings, etc. I've also 
> got a check in the QSF code that if the QOF interface version is incremented 
> (due to additional/modified data types), the user is warned if a file 
> contains an old set of data types.

Excellent.

-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