Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Problem using a switch control
Re: Problem using a switch control [message #45615 is a reply to message #45610] Thu, 17 December 2015 10:11 Go to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
mr_ped wrote on Tue, 15 December 2015 22:19
			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...


Well you could also use MakeTuple....
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multiple lines on EditString
Next Topic: Installation Problem in OpenSUSE Tumbleweed
Goto Forum:
  


Current Time: Thu May 16 13:48:33 CEST 2024

Total time taken to generate the page: 0.01645 seconds