Ledgers, Registers and Sheets Oh My!

Josh Sled jsled@asynchronous.org
Tue, 27 Nov 2001 10:05:52 -0800


On Tue, Nov 27, 2001 at 09:24:41AM -0500, Derek Atkins wrote:

| I've been working on an EntryLedger (to manipulate Order Entries),
| which looks a lot like the SplitRegister, but different.  I'm
| wondering how much ELSE I'm going to have to change or re-implement to
| get it to work.  This really sounds like I might need a LOT of
| duplicated code elsewhere, which would seem to be the "wrong" thing.

Indeed... and in my code-browsing and talking to dave_p on #gnucash last
night, it was apparent that it would be good for the register widget to
be able to handle Registers generically instead of just SplitRegisters.

I was going to survey the functions which dealt with the SplitRegisters,
and get in touch with you to see if we can pull out some interface for
what would otherwise be a Register base class.

In that example, for instance, that get_blank_split[_vcell]
SplitRegister-taking function is probably generic across all registers
... something like "get blank entry vcell" or something...

| It would be nice if there were one or two APIs that I could implement
| that would give me what I want, instead of having to re-build
| everything from the SplitRegister all the way up the the RegWindow and
| beyond.

You'll get only agreement from me... that would be nice.

| Take a look at business/business-ledger/.. for what I've done so far.

I will.

Cheers...
...jsled