Hi,
I have created an application with one ListBox and two TextAreas such as Completed Objectives and NON Completed Objectives.
When an item is checked in the ListBox, it is added to the Completed Objectives text area and deleted from the NON Completed Objectives text area.
I have put the following code in a Timer
me.period=1000
Dim i As Integer
ObjectivesCompleted = ""
ObjectivesNOTCompleted = ""
For i=0 to ListBox1.ListCount-1
if ListBox1.CellCheck(i,0) then
ObjectivesCompleted = ObjectivesCompleted + str(Listbox1.Cell(i,0)) + EndOfLine
TextArea1.text = ObjectivesCompleted
end
Next
For i=0 to ListBox1.ListCount-1
if NOT ListBox1.CellCheck(i,0) then
ObjectivesNOTCompleted = ObjectivesNOTCompleted + str(Listbox1.Cell(i,0)) + EndOfLine
TextArea2.text = ObjectivesNOTCompleted
end
Next
For some reason, this code fails to delete the last item from the NON Completed Objectives text area when all items in the ListBox are checked.
To fix this deficiency, I created another timer that sets the NON Completed Objectives text area to a blank string.
This code with two timers works perfectly in Carbon.
When I try the same code in Cocoa, the NON Completed Objectives text area is flickering and is showing no text.
So, I need to either put up with Carbon, or try to find a way to fix the problem with Cocoa.
I would appreciate any suggestions.
Thank you