[Tutor] Problems with Gauge Bar.
Olrik Lenstra
o.lenstra at gmail.com
Thu Aug 21 21:21:18 CEST 2008
>
>
> def onScan(self, event):
>> self.myfile = open('foo.txt')
>> self.count = 0
>> self.setTimer(0.01, self.processLine)
>>
>> def processLine(self):
>> line = self.myfile.readline()
>> if line:
>> processLine(line)
>>
>
> This function needs to be defined somewhere obviously!
> It is a global function not a method of your class.
>
Ah, I got this mixed up. I thought this was a function built into python.
So I would need to define setTimer in the MyClass too.
Is there anything that I can read on timers?
>
> self.count += 1
>> self.myGauge.setValue(count)
>>
>
> And now you access the attribute you created in __init__ above...
>
Kind of silly to forget not to make a reference to the gauge bar.
Got that fixed at least.
Thank you so much for replying.
Regards,
Olrik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080821/1c4ae3a0/attachment-0001.htm>
More information about the Tutor
mailing list