[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: static (class) variables
- From: Andreas Matthias <andreas.matthias@...>
- Date: Sun, 22 Nov 2015 20:53:13 +0100
Andreas Matthias wrote:
> Jay Mithani wrote:
>
>> Using 'self' over 'Display' when defining the functions for the Display class should fix
>> your issue.
>
> Oh, you are right. I didn't expected this. I though `self' would make it
> an instance variable. Now I have to rephrase my question: Why is
> `self.count' a class variable in the following example while `self.text'
> is a member variable?
I think I understand:
Display:new() --> Display.new(Display) --> self refers to Display
dis1:getCount() --> dis1.getCount(dis1) --> self refers to dis1
Andreas