Odd Transcript message

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Odd Transcript message

LynnFogwell
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
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Odd Transcript message

Yoshiki Ohshima-2
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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: Odd Transcript message

LynnFogwell
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
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners