[sword-devel] problem report
Martin Gruner
sword-devel@crosswire.org
Tue, 22 Aug 2000 11:16:47 +0200
Hi Troy,
thanks for your response. Sorry to say, but I can't reproduce the error with
search.cpp - it works fine there.
But I created some debugging output with bibletime.
I perform a multiword case insensitive search in the GerLut module with
search prase "amen".
The callback functin looks like:
staic char old_p;
void percentUpdate(char percent, void *p){
if (percent != old_p){
old_p = percent;
debug(QString("%1 o/o").arg( (int) percent ) );
(...)
}
}
Debugging output (the percentage values):
2 o/o
5 o/o
6 o/o
7 o/o
8 o/o
9 o/o
10 o/o
11 o/o
12 o/o
13 o/o
14 o/o
15 o/o
16 o/o
17 o/o
18 o/o
19 o/o
20 o/o
21 o/o
22 o/o
23 o/o
24 o/o
25 o/o
26 o/o
27 o/o
28 o/o
29 o/o
30 o/o
31 o/o
32 o/o
33 o/o
34 o/o
35 o/o
36 o/o
37 o/o
38 o/o
39 o/o
40 o/o
41 o/o
42 o/o
43 o/o
44 o/o
45 o/o
46 o/o
47 o/o
48 o/o
49 o/o
50 o/o
51 o/o
52 o/o
53 o/o
54 o/o
55 o/o
56 o/o
57 o/o
58 o/o
59 o/o
60 o/o
61 o/o
62 o/o
63 o/o
64 o/o
65 o/o
66 o/o
67 o/o
68 o/o
69 o/o
70 o/o
71 o/o
72 o/o
73 o/o
74 o/o
75 o/o
76 o/o
77 o/o
78 o/o
79 o/o
80 o/o
81 o/o
82 o/o
83 o/o
84 o/o
85 o/o
86 o/o
87 o/o
88 o/o
89 o/o
90 o/o
91 o/o
92 o/o
93 o/o
94 o/o
95 o/o
96 o/o
97 o/o
98 o/o
99 o/o
100 o/o
101 o/o
102 o/o
103 o/o
104 o/o
105 o/o
106 o/o
107 o/o
108 o/o
109 o/o
110 o/o
111 o/o
112 o/o
113 o/o
114 o/o
115 o/o
116 o/o
117 o/o
118 o/o
119 o/o
120 o/o
121 o/o
122 o/o
123 o/o
124 o/o
125 o/o
126 o/o
127 o/o
-128 o/o
-127 o/o
-126 o/o
-125 o/o
-124 o/o
-123 o/o
-122 o/o
-121 o/o
-120 o/o
-119 o/o
-118 o/o
-117 o/o
-116 o/o
-115 o/o
-114 o/o
-113 o/o
-112 o/o
-111 o/o
-110 o/o
-109 o/o
-108 o/o
-107 o/o
-106 o/o
-105 o/o
-104 o/o
-103 o/o
-102 o/o
-101 o/o
-100 o/o
-99 o/o
-98 o/o
-97 o/o
45 o/o
46 o/o
47 o/o
48 o/o
49 o/o
50 o/o
51 o/o
52 o/o
53 o/o
54 o/o
55 o/o
56 o/o
57 o/o
58 o/o
59 o/o
60 o/o
61 o/o
62 o/o
63 o/o
64 o/o
65 o/o
66 o/o
67 o/o
68 o/o
69 o/o
70 o/o
71 o/o
72 o/o
73 o/o
74 o/o
75 o/o
76 o/o
77 o/o
78 o/o
79 o/o
80 o/o
81 o/o
82 o/o
83 o/o
84 o/o
85 o/o
86 o/o
87 o/o
88 o/o
89 o/o
90 o/o
91 o/o
92 o/o
93 o/o
94 o/o
95 o/o
96 o/o
97 o/o
98 o/o
100 o/o
????????????????
Am Die, 22 Aug 2000 schrieb Troy A. Griffitts:
> 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 :)
>
> -Troy.
>
> 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.