[squeak-dev] [BUG] Browsing uniclasses

Jakob Reschke forums.jakob at resfarm.de
Tue Mar 3 20:08:36 UTC 2020


Am Mo., 24. Feb. 2020 um 14:37 Uhr schrieb Thiede, Christoph
<Christoph.Thiede at student.hpi.uni-potsdam.de>:
>
>
> At first glance, Browser >> #hasClassSelected is erroneous because it hardcodes Smalltalk instead of the displayed environment:
>
>
> hasClassSelected
>
> ^ selectedClassName notNil and: [(Smalltalk classNamed: selectedClassName) notNil]
>
>
> Is my assumption correct that there should be almost zero references to Smalltalk in Browser & Co.?
>

Indeed, this hasClassSelected is wrong when browsing other
environments (regardless of the special case "Uniclasses").

Browser should not use Smalltalk to access any browsed objects. It may
use Smalltalk or better self class environment to find other classes
from the Tools package for IDE purposes, but then it might be better
to just refer to these classes directly without the dynamic lookup.


More information about the Squeak-dev mailing list