I have the following code - which is started by a button - say button1 which has to happen every one second -through a thread.
self.pump_rpm_text_control.AppendText(str(self.sheet_num.cell_value(self.sel+1,10)*(SortAndDecode(self.data, 'FrqQ5'))/65536))`
The problem I am facing here is - the "self.sel" is recorded from an excel sheet - when a selection from an excel sheet happens.
So I decided to write an if condition something like this:
if not self.OnList():
self.pump_rpm_text_control.AppendText("000")
else:
self.sheet_num.cell_value(self.sel + 1, 10)
self.pump_rpm_text_control.AppendText(str(self.sheet_num.cell_value(self.sel+1,10)*(SortAndDecode(self.data, 'FrqQ5'))/65536))
OnList - is the event that is called when a selection is being made on a listbox. But however my code is still going to ELSE, even though my OnLIST event has not happened. Any help would be greatly appreciated.
In the same way that this code follows the
elsepath?It all depends on what value
Onlistreturns asfurascommented