On Fri, 2006-12-08 at 17:34 -0500, Phil Longstaff wrote: > I'm working on saving/restoring scheduled transactions, and have some > questions: > > 1) Accounts - The only difference I can see between regular accounts and > the accounts created for scheduled transactions is in the currency - the > currency for scheduled transactions is in the "template" namespace. > Anything else? Could we have a new account type called TEMPLATE so that > I wouldn't need a really complex query to load just the regular > accounts?
Until this is fixed (*), I think it's safe to have a separate account-type, yes. As per the other thread, I agree: a bit isn't sufficient, a whole separate rooted tree is The Right Thing, and a bit will probably suffice for the moment. :) (*) This really should be fixed: the template-transaction accounts should probably be a more literal mirror of the real account tree, in terms of types and commodities. The whole point of using real Accounts and Transactions for the template transactions was to leverage the editor (register) and the implicit application constraints for the template transactions ... I didn't want to re-implment or re-specify a bunch of logic around "template" transactions seperate from "real" transactions, and especially not the register component. But for a few reasons, they did diverge. In any case, it'd be nice if they were closer together, but that's not a focus of the branches/sx-cleanup/, right now. > 2) SXRegister() registers the class with qof using GNC_SX_ID rather than > GNC_ID_SCHEDXACTION (which would agree with how every other object is > registered). I don't think it will break anything to change this, but > want to know if there is anywhere else I should check i.e. where else > are getters/setters used? Yeah, I think that's simply incorrect. It looks like the qof_instance_init(...) calls are with GNC_ID_SCHEDXACTION, but the qof_class_register is with GNC_SX_ID. You should feel free to change it; ideally as a seperate physical/logical commit, so I can patch it over to branches/sx-cleanup/ ... FYI, the branches/sx-cleanup/ also has a new separate GNC_ID_SXES type for the collection, in order to support insertion/removal events of SXes overall. It's the same stuff from SX-book{,-p}.[ch], but qof-ized a bit more. I don't think that implies anything for the storage, though; it's just a runtime change at present. -- ...jsled http://asynchronous.org/ - `a=jsled; b=asynchronous.org; echo [EMAIL PROTECTED]
signature.asc
Description: This is a digitally signed message part
_______________________________________________ gnucash-devel mailing list gnucash-devel@gnucash.org https://lists.gnucash.org/mailman/listinfo/gnucash-devel