On 07/04/17 20:21, Phil wrote:
> After a bit more thought I now realise that I just
> need to use self to reference e[][] in my check function.
You need to use self any time you access any member of your
class. So in your case:
class TestGUI:
def __init__(self, master):
self.master
Phil wrote:
> On Sat, 08 Apr 2017 09:12:17 +0200
> Peter Otten <__pete...@web.de> wrote:
>
> Thank you yet again Peter.
>
> I realised what the answer is after taking a break for a couple of hours,
> however, I didn't know about:
>
>> ...
>> self.check_button = Button(
>>
Phil wrote:
> On Sat, 8 Apr 2017 02:00:38 +1000
>
> This is one of those times where I wish I could delete a sent message.
>
> After a bit more thought I now realise that I just need to use self to
> reference e[][] in my check function.
Relax ;) We all had to go through a learning process.
On Sat, 08 Apr 2017 09:12:17 +0200
Peter Otten <__pete...@web.de> wrote:
Thank you yet again Peter.
I realised what the answer is after taking a break for a couple of hours,
however, I didn't know about:
> ...
> self.check_button = Button(
> master,
> tex
On Sat, 8 Apr 2017 02:00:38 +1000
This is one of those times where I wish I could delete a sent message.
After a bit more thought I now realise that I just need to use self to
reference e[][] in my check function.
--
Regards,
Phil
___
Tutor maillist
On 07/04/17 17:00, Phil wrote:
> ...I'm now having a problem knowing when to use the "self" reference.
self is needed every time you use an instance attribute or method.
It is equivalent to 'this' in C++(or Java), but in Python it is
never implicit you always have to explicitly specify self when
Phil wrote:
> I've progressed a little further but I'm now having a problem knowing when
> to use the "self" reference. In the following code, the function "ckeck"
> is called without the need to press the "check" button. This didn't occur
> before I sprinkled "selfs" into the code and added "arra
On Sat, 8 Apr 2017 02:00:38 +1000
Phil wrote:
If I define "e" lists before the class then everything works as I had expected,
however, I don't that's technically correct. Or is it?
--
Regards,
Phil
___
Tutor maillist - Tutor@python.org
To unsubscri
Thank you for reading this.
I've progressed a little further but I'm now having a problem knowing when to
use the "self" reference. In the following code, the function "ckeck" is called
without the need to press the "check" button. This didn't occur before I
sprinkled "selfs" into the code and