[sword-devel] problem report

Troy A. Griffitts sword-devel@crosswire.org
Mon, 21 Aug 2000 19:12:27 -0700

No, this is not your problem.  If it returns anything outside of 0-100,
it is my bug.  Could you try to reproduce the problem with
sword/examples/cmdline/search.cpp.  Maybe just add cout << (unsigned
int) percent in the update function and show me the case where it is
outside of the valid range.  I will look into why this happens.  There
were some early problems that might have caused this, but if you have
updated within the last few days, they should be fixed.  Thanks for
being my beta tester :)


PS.  I added the void *userData parameter for you, thinking it would
help with multiple threads, you could pass the thread handle, or maybe
the actual pointer to the meter control that you want to set for this
thread, or something else useful.  Anyway, let me know if there is
anything I could do to make your life easier.

> I seem to run into a problem while I am trying to use your interface for
> search progress displaying. You provided a callback function.
> I implemented it like this:
> unsigned int cms_currentProgress = 0;
> void percentUpdate(char percent, void *p){
>         cms_currentProgress = (unsigned int) percent;
>         ...
> }
> Now th eproblem is, that cms_currentProgress will have values higher than 100
> (max. 127) and lower than zero (min -127). Is this my fault (I am not a good
> programmer, so I might have done some stupid mistake)?
> Please give me some advice.
> Thank you for all your efforts for the kingdom of God.