QOF iteration and callbacks
linux at codehelp.co.uk
Sun Jun 20 12:12:09 EDT 2004
On Sunday 20 June 2004 4:46, Linas Vepstas wrote:
> > I've posted the code as it was this morning (see other message) and I can
> > explain why a GSList of parameter names is sufficient for me and,
> > probably, would be better than a foreach of the entire list for my needs.
> Hmm. I've found that the foreach() style of programming is better
> ifor many reasons, and want to support only that. I was tickled to
> notice the other day that even the Linux kernel is migrating to
> a foreach style of coding.
> It should be easy for you to take a foreach interface and build
> a gslist if that's what you want.
OK. Will the foreach provide the entire parameter register or just the
parameter names? Would that be an option?
> > The original scenario involved just adding a single invoice - in that
> > case, I
> I haven't yet read the back-emails. If you're working with invoices,
> why would you need to know about all objects or all paramters?
I only started out thinking about invoices, Derek quickly raised the stakes
when he said what was needed was a full merge operation over two GNCBook
structures. I realised it would bring extra benefits, beyond the narrow use I
had planned and thought it would be a good challenge.
> Don't you already ahve a clear idea of what an invoice is?
Yes, I also now have a much better idea of what QOF and a Book are too!
The final code should open up all sorts of possibilities, like closing books
easily and still being able to recover the data, or create reports that span
multiple books. I'm trying to make it as generic as possible - no limits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20040620/78f62c29/attachment.bin
More information about the gnucash-devel