Variables getting wrong value
Posted: Mon Jan 09, 2006 12:43 pm
				
				I have an application I'm writing that uses multiple threads. The thread when active processes a set folder and adds information in a listIconGadget.
I have a timer that counts down and then calls a procedure that processes the items in the list that the thread has added to it.
In this procedure consists of a loop that takes the first row from the list, processes it and then removes it. Once all items have been processed the procedure quits.
However, when I use:
dataToProcess$ = GetGadgetItemText(#gadget_processlist,0,0)
The value that is put in the variable is not correct and seems to be from an entirelly different gadget elsewhere in the application. If I print the variable and the getGadget to the debug window both values are different. The value printed directly from the gadget is correct, the variable is not.
Does anyone know what and why this is happening. I can't find any logical explaination for it. I thought it might have been a threading thing but even with the threads stopped it still does it. The procedure is also causing an 'Invalid memory access' error, but again I'm not sure why.
I can't post the procedure code at the mo because I'm at work but any suggestions and help would be appreciated.
My System:
Windows XP Pro x64 Edition
2Gb RAM
GeForce 6800GT 256Mb
I've also tested on a 32Bit Windows XP Pro as well with the same results.
			I have a timer that counts down and then calls a procedure that processes the items in the list that the thread has added to it.
In this procedure consists of a loop that takes the first row from the list, processes it and then removes it. Once all items have been processed the procedure quits.
However, when I use:
dataToProcess$ = GetGadgetItemText(#gadget_processlist,0,0)
The value that is put in the variable is not correct and seems to be from an entirelly different gadget elsewhere in the application. If I print the variable and the getGadget to the debug window both values are different. The value printed directly from the gadget is correct, the variable is not.
Does anyone know what and why this is happening. I can't find any logical explaination for it. I thought it might have been a threading thing but even with the threads stopped it still does it. The procedure is also causing an 'Invalid memory access' error, but again I'm not sure why.
I can't post the procedure code at the mo because I'm at work but any suggestions and help would be appreciated.
My System:
Windows XP Pro x64 Edition
2Gb RAM
GeForce 6800GT 256Mb
I've also tested on a 32Bit Windows XP Pro as well with the same results.