code in cvs is broken

Derek Atkins warlord@MIT.EDU
19 Nov 2001 16:26:46 -0500


What about bootstrapping?  Assume I begin a new chart of accounts.
How do I get the list of ISO currencies?  There is no Backend to
connect to, and even if there were, there is no data stored in that
Backend.  These default startup currencies need to come from
somewhere.  Where?

Also, the ISO currencies really are quazi-static.  They may change
over periods of years, but not really more often than that.  Sure, the
rest of the commodity namespace is user-defined and really needs to be
filled in by a Backend, but ISO currencies are really part of the
engine configuration.

Quite honestly, IMHO, I don't see why they can't be created at
run-time by C code.

-derek

linas@linas.org (Linas Vepstas) writes:

> As I now realize, this is really a problem with a design decision in the 
> file backend, and not with the engine architecture.   
> 
> Loading the currency data into the engine from a file, any kind of file,
> scheme form or otherwise, is a bad idea if the backend has not yet been
> initialized and a specific data store has been connnected to.  
> 
> To be very concrete: if you create a transaction with a currency that
> the sql backend doesn't know about, or is not identical to what the
> backend beleives it knows about this currency, then either you are
> misleading the user with bad data, or you risk a core dump or some 
> other weird error.  I don't think there's any code in there to just
> notice that the currency has magically changed, and deal with it.  
> You have to use te API to set/get consistent data.
> 
> The right way to do this is to fix the file backend to know about a
> default set of currencies.
> 
> --linas
> 
> -- 
> pub  1024D/01045933 2001-02-01 Linas Vepstas (Labas!) <linas@linas.org>
> PGP Key fingerprint = 8305 2521 6000 0B5E 8984  3F54 64A9 9A82 0104 5933
> _______________________________________________
> gnucash-devel mailing list
> gnucash-devel@lists.gnumatic.com
> http://www.gnumatic.com/cgi-bin/mailman/listinfo/gnucash-devel

-- 
       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@MIT.EDU                        PGP key available