[Tutor] Multiple inheritance
Phil
phillor9 at gmail.com
Sat May 15 01:03:00 EDT 2021
On 14/5/21 10:18 pm, Alan Gauld via Tutor wrote:
> Thank you Alan for your detailed reply, however, there is still a problem.
> It should do, it should print 180.
> It works for me...
It did for me too, the number 180 was lost among the error messages.
>
> class MyForm(wx.Frame):
> def __init__(self, aMeter,....):
> wx.Frame.__init(....)
> self.meter = aMeter
> .... as before
As soon as I saw "self.meter = Meter" I said to myself "that's the
answer" and so I excitedly added that line and "self.meter." where
required, but.
> def update(self):
> if self.meter.angle == 360:....
At this point the error is "AttributeError: type object 'Meter' has no
attribute 'angle'". An error that I've become very familiar with since I
started this project.
The same error message continues for each Meter variable.
I've checked and rechecked to make sure that I've entered the text
correctly and so there must be some other subtle error.
Thank you for your patience.
--
Regards,
Phil
More information about the Tutor
mailing list