On Friday 18 June 2004 3:08, Linas Vepstas wrote:
> On Thu, Jun 17, 2004 at 10:46:33AM -0400, Derek Atkins was heard to remark:
> > > void gnc_bm_foreach (QofEntity obj, gpointer ud1); doesn't work. Why?
> >
> > You need (QofEntity* obj, gpointer ud1).
>
> I'm guessing that the * was dropped accidentally, and then Niel
> had a very hard seeing that it was missing.  

Precisely. I missed it because of my lack of familiarity with callbacks - 
normally you get a much clearer warning from the compiler when you make a 
typo like that.

However, that wasn't all that was missing. I'm testing this in a 'limited' 
environment where only certain parts of the engine are initialised, 
specifically, I haven't loaded any modules or any external files. What I 
didn't realise is that I could not hope to use GNCInvoice in that environment 
- it was never going to be properly registered with QofObject and would 
therefore always generate the critical error. I've switched to testing 
Account and it's coming along OK. No more critical errors from 
qof_object_foreach. The iteration is solved, now I'm working on building the 
rule sets.

> Once you miss 
> something like that, the brain can leap to various incorrect
> conclusions, and then ...
>
> > > my brain is getting addled, is that
> > > example a declaration or just another cast?
>
> which didn't have anythingto do with the actual problem.

:-)

-- 

Neil Williams
=============
http://www.codehelp.co.uk/
http://www.dclug.org.uk/
http://www.isbn.org.uk/
http://sourceforge.net/projects/isbnsearch/

http://www.biglumber.com/x/web?qs=0x8801094A28BCB3E3

Attachment: pgpMlqsN2LzZ4.pgp
Description: signature

_______________________________________________
gnucash-devel mailing list
[EMAIL PROTECTED]
https://lists.gnucash.org/mailman/listinfo/gnucash-devel

Reply via email to