GnuCash Daily Source Diff

Linas Vepstas linas@linas.org
Fri, 19 Oct 2001 18:08:43 -0500


On Fri, Oct 19, 2001 at 03:43:45PM -0700, Dave Peticolas was heard to remark:
> 
> I changed the kvp delete audit function so now it writes 'k' in the
> objtype field to be consistent with the kvp-autogen functions. 

OK.

> I'm
> not sure what is supposed to happen in events.c when a 'k' is
> encountered. 

Hmm. On reviewing the code, I see that a 'k' should never be encountered.

> Presumably it needs to generate an event for the
> object which 'owns' the kvp value?

Yes, exactly.

Presumably,  if a kvp value on an account is modified, an 'account' event 
is generated.  In order for the change to be picked up by the other 
listening clients, there would have to be an 'a' type record as well as 
a 'k' type.  If there is, then the the kvp changes to the account will
be picked up.  I vaguely remember testing this, and it worked ... I think.
Care to test?

So, in fact, I guess the code in events.c is just fine the way it is ...
I added a warning message. 

--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