[Gnucash-changes] r13352 - gnucash/trunk - Fix "default limit" QOF eventing stuff; thanks Andi.

Neil Williams linux at codehelp.co.uk
Sat Feb 25 16:49:22 EST 2006


On Saturday 25 February 2006 9:24 pm, Josh Sled wrote:
> > >  /** Allow scope for more defaults in future. Additional
> > >  event identifiers must be larger than this. */
> > > -#define QOF_DEFAULT_LIMIT  10
> > > +#define QOF_DEFAULT_EVENT_LIMIT  QOF_EVENT__LAST
> >
> > Josh - why was this a bug? What was wrong with a gap?
>
> The gap was in the wrong direction. :)  The max value (1<<4) is 16, and
> 10 was less than that.

OK, I see that now.

> > Supplementary events will now have to be based on QOF_DEFAULT_LIMIT + n
> > rather than just something bigger than 10?
>
> They should always be specified as based off some constant identifier,
> rather than a particular value.  I'm not sure what you mean.

Why? This probably sounds obvious to you but if new identifiers are expected 
to be based on QOF_DEFAULT_LIMIT + n, then I need to ensure this assumption 
is in the API docs because it certainly would not be obvious to me. I expect 
it's just something you've covered elsewhere that I haven't anticipated but 
I'd like to be sure. (Blame it on me being self-taught.)

> > I thought nobody wanted to iterate over event identifiers?
>
> I have no idea how that relates to this...?

I thought you were using the << operator to create some way of iterating 
through the list of available event identifiers somewhere but couldn't see 
why. Derek's pointer to bitmasking cleared that up.

-- 

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.gnucash.org/pipermail/gnucash-devel/attachments/20060225/e5258ebf/attachment.bin


More information about the gnucash-devel mailing list