[squeak-dev] [Tools] (Object >> #inspect) now returns the tool
instead of the object
marcel.taeumel
Marcel.Taeumel at hpi.de
Tue May 19 08:50:07 UTC 2015
Hi, there! :)
I just want to mention and explain, why (Object >> #inspect) now returns the
tool window instead of the object as in 4.5.
The Tools package adds several convenient methods to the base system:
Object >> #explore
Object >> #inspect
Object >> #browse
Behavior >> #browse
All but #inspect returned the created tool. So I went for consistency. But
in particular, those methods should return the tool because because
otherwise the programmer has no simple means to access the created
window/tool programmatically. Model and object are, however, always
accessible (via #model or just #self).
So if you got code like this:
self someObjects add: myObject inspect.
Please change it to:
self someObjects add: myObject inspect; yourself.
Or even better to:
myObject inspect.
self someObjects add: myObject.
I think that it is good practice/style to use #yourself if you want to get
the receiver back in a chain of calls:
self myMorphs add: (MyMorph new color: Color yellow; yourself).
Best,
Marcel
--
View this message in context: http://forum.world.st/Tools-Object-inspect-now-returns-the-tool-instead-of-the-object-tp4827263.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev
mailing list
|