[Gnucash-changes] r13483 - gnucash/trunk - Rework the events generated by the account/group files and consumed by

Derek Atkins warlord at MIT.EDU
Mon Mar 6 09:09:12 EST 2006


David,

David Hampton <hampton at cvs.gnucash.org> writes:

> +  ed.node = acc;
> +  ed.idx = 0;
> +  qof_event_gen(&acc->inst.entity, QOF_EVENT_MODIFY, &ed);
> +
>    if (qof_commit_edit_part2(&acc->inst, on_err, noop, acc_free))
>        gnc_engine_gen_event (&acc->inst.entity, GNC_EVENT_MODIFY);
>  }

Two problems here:

1) You shouldn't need this particular construct for the MODIFY event.
   You can lookup the modified Account based on the QofEntity in the
   event callback, so you shouldn't need to pass the actual Account*
   in the event.

2) You've now changed the MODIFY API, and I'm not conviced you've
   changed it globally.  That could be dangerous, in particular if the
   event gets emitted from somewhere that didn't know about the
   change.

-derek

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


More information about the gnucash-devel mailing list