RFC: refactoring window-register as widget-register + containing window

Dave Peticolas dave@krondo.com
25 Nov 2001 16:52:18 -0800


--=-jxcfgDcLvpFZBLDOi57E
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

On Sun, 2001-11-25 at 16:47, Derek Atkins wrote:
> Dave Peticolas <dave@krondo.com> writes:
>=20
> > On Sun, 2001-11-25 at 16:33, Derek Atkins wrote:
> > > Moreover, I'd like to be able to re-use as much of SplitLedger as
> > > I can.
> >=20
> > Well, much of the split-ledger is completely specific to splits.
> > So there isn't as much there to re-use as there might seem.
>=20
> Well, yea, but not all of it.  One would think that if the only code
> were pertaining to Splits then you would only need a list of getters,
> setters, and layouts.  There is clearly much more than that.

Yes, but see my previous post. I'm not saying there's nothing that
can be refactored, just that we should do it when we have two completely
separate registers done and can step back and see what can be=20
refactored.


> > > By this do you mean 'Date', 'Text', 'Amount', etc..  Or do you mean
> > > DATE_CELL, NUM_CELL, DESC_CELL, CREDIT_CELL, DEBIT_CELL, etc.  If the
> > > former, great.  If the latter, then I think the abstraction is wrong.
> >=20
> > I mean you can register a new 'X' cell designed to hold
> > data of type 'X' but that is not specific to a particular
> > higher-level object, like a split, invoice, etc.
>=20
> Right, and my question is if I need two cells to hold a Date (one for
> 'Today' and one for 'DueDate', do I need to register a "date" once or
> twice?  In other words, why do you necessarily need all the FOO_CELL
> definitions in split-ledger.h?

You register one "date" cell, although this specific example is moot
since there already is a date cell. You need the FOO_CELL definitions
in split-ledger.h so that you know what specific date/amount/text/etc.
is being stored in a cell, i.e., is it the posted date or the entered
date or the recociled date, or what?

dave


--=-jxcfgDcLvpFZBLDOi57E
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD4DBQA8AZJC5effKKCmfpIRAucWAKC0EF6gtxyn+2ewHiy0Pu6ZABQBCQCYzMWw
wGybEAhjeswsA0sxXhkKDg==
=xFvW
-----END PGP SIGNATURE-----

--=-jxcfgDcLvpFZBLDOi57E--