Budgets ... again

John Ralls jralls at ceridwen.us
Mon Sep 26 16:04:51 EDT 2011


On Sep 26, 2011, at 11:35 AM, Christian Stimming wrote:

> Am Montag, 26. September 2011 schrieb John Ralls:
>> I have a plan to rework the engine (the module which does all of
>> the accounting and business calculations) in stages. Stage one is to write
>> comprehensive tests for each class. Stage two (which will interleave with
>> stage one) is to overhaul each class to be a well-behaved GObject class
>> with all access to data (including KVP) via function calls instead of
>> passing out pointers for other objects to modify at will.
> 
> Out of curiosity: Which examples for "passing out pointers" do you have in 
> mind here? Surely there is plenty of access to KVP data by simply accessing 
> the KVP directly, which is bad, but is there also direct pointer manipulation 
> in that many places?

Passing out pointers refers to KVP, where each class has a specific function for retrieving the pointer to the toplevel KVPFrame. But once you have a pointer to an object in C, you can access its non-private parts, and only Account, Commodity, and Lot implement private structures the GObject way. I can't point to any specific violations offhand, but I'm pretty sure I've seen some.

Regards,
John Ralls




More information about the gnucash-devel mailing list