Home » Community » Newbie corner » Problem using a switch control
Re: Problem using a switch control [message #45603 is a reply to message #45599] |
Mon, 14 December 2015 20:49 |
|
mirek
Messages: 13980 Registered: November 2005
|
Ultimate Member |
|
|
Giorgio wrote on Mon, 14 December 2015 15:08Hello Mirek,
thank you for your post. I have used the debugger and it seems switch cases have different values. In fact, the value is assigned during a loop with a variable that is incremented. Anyway, I created a very small test case, attached. Please note that the test case is very small, most of the space is the sqlite db. As my application uses a MySQL db, I have created a sqlite db: please note that I got rid of a lot of tables, so maybe the db and application look incoherent. To reproduce the problem, launch the application and click on the "Select job order" button. A dialog opens: put in the active field the following order id 15036120901 (maybe it works with other order ids, but I tested that one) and hit return. After that, click on a switch case and then pass the mouse over other cases (try different cases, sometimes it works with a particular case). The problem is in lines 51-85 (specifically, lines 62-77), but I cannot locate it.
Thank you for the support,
Gio
for(int j = 0; j < n_of_drums; j++)
{
DDUMP(query[DRUM]);
dlgSelectDrums.lengthList.Set(i, AsString(query[DRUM]), ( AsString(query[METER]) + "m - N: " + AsString(k+1) + " of " + AsString(n_of_drums)));
query[DRUM] = 125
query[DRUM] = 125
query[DRUM] = 125
query[DRUM] = 140
query[DRUM] = 160
query[DRUM] = 160
...exactly what I have suspected...
|
|
|
|
|
Problem using a switch control
By: Giorgio on Fri, 11 December 2015 09:04
|
|
|
Re: Problem using a switch control
By: mirek on Fri, 11 December 2015 13:03
|
|
|
Re: Problem using a switch control
By: Giorgio on Mon, 14 December 2015 15:08
|
|
|
Re: Problem using a switch control
By: mirek on Mon, 14 December 2015 20:49
|
|
|
Re: Problem using a switch control
By: Giorgio on Tue, 15 December 2015 10:31
|
|
|
Re: Problem using a switch control
By: mirek on Tue, 15 December 2015 12:46
|
|
|
Re: Problem using a switch control
By: Giorgio on Wed, 16 December 2015 15:10
|
|
|
Re: Problem using a switch control
By: mr_ped on Tue, 15 December 2015 22:19
|
|
|
Re: Problem using a switch control
By: Giorgio on Wed, 16 December 2015 15:03
|
|
|
Re: Problem using a switch control
By: mirek on Thu, 17 December 2015 10:11
|
Goto Forum:
Current Time: Thu May 16 08:19:57 CEST 2024
Total time taken to generate the page: 0.01662 seconds
|