Longer term projects

Phil Longstaff phil.longstaff at yahoo.ca
Sun Jan 29 17:26:41 EST 2012


I was thinking more along the lines that currently, any piece of code can register for qof events and receive a callback whenever anything changes in any transaction.  Do we want to keep this kind of behavior?


________________________________
 From: John Ralls <jralls at ceridwen.us>
To: Phil Longstaff <phil.longstaff at yahoo.ca> 
Cc: GnuCash development list <gnucash-devel at gnucash.org> 
Sent: Sunday, January 29, 2012 5:00:31 PM
Subject: Re: Longer term projects
 



On Jan 29, 2012, at 10:33 AM, Phil Longstaff wrote:

Have you given any thought to what it will take to replace qof event notifications with gobject signals?  The models are substantially different.  With qof, you register for all events and get everything, and then need to weed out what you are interested in, based on event type and object type.  To receive gobject signals, you need to connect to the signal for specific instances.
>
>
>For some things, e.g. new prices, we could use the pricedb as the object which emits the signals when new prices are added or prices are modified.  How about for new engine objects?  do we need a gnc_engine object for these signals? 
>
>

All of the engine classes are derived from QofInstance, so it can be the source of the signal if we need a global source. In a lot of cases we can probably use the GObject Notify signal, which is emitted for every property change. Remember that one can also register an emission hook to get behavior more like QofEvents.

Regards,
John Ralls


More information about the gnucash-devel mailing list