Home » Community » Newbie corner » Problem using a switch control
Re: Problem using a switch control [message #45610 is a reply to message #45589] |
Tue, 15 December 2015 22:19   |
mr_ped
Messages: 826 Registered: November 2005 Location: Czech Republic - Praha
|
Experienced Contributor |
|
|
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)));
pardon my ignorance (and laziness to check the zip with full source), but is it ok the for has "j" and the Set takes "i" in first parameter?
Also when the key is "AsString(query[DRUM])", you may produce string like "i,query[DRUM]" for keys, and then extract the query[DRUM] by splitting the key with ',', if you insist to have that data encoded in key. Just an option, I would probably consider in PHP (where the thing is slow as hell already anyway, and writing str manipulation is easy too)... but in U++ I think having a vector with query[DRUM] values around and using pure "i" (or j?) is easier to write, read and maintain...
|
|
|
 |
|
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: Tue Apr 29 04:25:44 CEST 2025
Total time taken to generate the page: 0.00887 seconds
|