[Newbies] finding assignments to variables?

Ron Teitelbaum ron at usmedrec.com
Tue Jul 24 02:20:53 UTC 2018


Hi Ralph,

You should be able to trace that using references.  If you used a mutator
just do senders of the mutator.

so ivar foo

might have an accessor

MyClass >> foo
   "return the value of foo"
   ^foo

and a mutator

MyClass >> foo: aFoo
   "set the value of foo to aFoo"
   foo := aFoo

if you only used the mutator to set the value of foo then senders of foo:
will give you what you are looking for.

if no use references.  By the way, if you did things this way references
will show your accessor and mutator, which is why I said you should be able
to trace it (by doing senders of what is returned by references.

All the best,

Ron Teitelbaum


On Mon, Jul 23, 2018 at 7:14 PM, Ralph Boland <rpboland at gmail.com> wrote:

> In squeak you can find out all references to a variable of a class
> by clicking on the vars button.
>
> Is there a way to find only the references to a variable of a class
> that assigns a value to that variable?
>
> Ralph Boland
> _______________________________________________
> Beginners mailing list
> Beginners at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/beginners/attachments/20180723/7bdf3774/attachment.html>


More information about the Beginners mailing list