Hi, Whenever I compile a particular method, the transcript displays the following line:
IdentityManager class >> populateDevelopersTable (name is shadowed)
So, it names the class and method I just compiled and then states that it is shadowed. What is 'shadowing' and how did I activate it for this particular method?
PS) I am using the Pharo image, but they don't have a newbies list...
Thanks, Lynn Fogwell
At Tue, 3 Nov 2009 10:53:40 -0500, Lynn Fogwell wrote:
Hi, Whenever I compile a particular method, the transcript displays the following line:
IdentityManager class >> populateDevelopersTable (name is shadowed)
So, it names the class and method I just compiled and then states that it is shadowed. What is 'shadowing' and how did I activate it for this particular method?
The most likely senario is that the IdentityManager class has an instance variable called 'name' and the populateDevelopersTable method declares a temporary variable called 'name' also. An instance variable is shadowed, or hidden, by an inner-scope variable with the same name.
Yes, because it happens to be "name", the warning can be read differently ^^;
-- Yoshiki
That was it. I had a block variable 'name' and the class also inherits an instance variable 'name'
Thanks! Lynn F.
On Nov 3, 2009, at 1:47 PM, Yoshiki Ohshima wrote:
At Tue, 3 Nov 2009 10:53:40 -0500, Lynn Fogwell wrote:
Hi, Whenever I compile a particular method, the transcript displays the following line:
IdentityManager class >> populateDevelopersTable (name is shadowed)
So, it names the class and method I just compiled and then states that it is shadowed. What is 'shadowing' and how did I activate it for this particular method?
The most likely senario is that the IdentityManager class has an instance variable called 'name' and the populateDevelopersTable method declares a temporary variable called 'name' also. An instance variable is shadowed, or hidden, by an inner-scope variable with the same name.
Yes, because it happens to be "name", the warning can be read differently ^^;
-- Yoshiki _______________________________________________ Beginners mailing list Beginners@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/beginners
beginners@lists.squeakfoundation.org