Newbie here, going through "Pharo by Example". The book mentions an example of EllipseMorph new openInWorld
result in a call to Morph openInWorld
, while EllipseMorph defaultColor
is an overridden message: how do I figure this out using the System Browser or something else?
The usual find method way only finds matches in the immediately selected class. Is it possible in general to lookup which class will respond to (say) Foo bar
?
Update: Thanks for all the suggestions (Finder, Spotter); the Debugger is the most eye-opening of the tools I've encountered yet!
Smalltalk offers lots of tools and browsers that can help you with this. If you already know the name of the message, you can:
In this case you could also type EllipseMorph new openInWorld
in a playground and select Debug-It from the menu. That will open a debugger with the selection on new
. If you click on into, the top line changes to EllipseMorph class(Behavior) new
. That indicates that the new
from Behavior
is used here. If you continue stepping with into (2 times), you'll see it change to EllipseMorph(BorderedMorph) initialize
. By just following the trace of messages sent, you can see where everything is implemented.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With