[squeak-dev] System -> Tools via Preferences
Bert Freudenberg
bert at freudenbergs.de
Fri Aug 9 11:56:08 UTC 2013
On 2013-08-09, at 09:56, Frank Shearar <frank.shearar at gmail.com> wrote:
> One of the System -> Tools dependencies is from Preferences class >>
> #browseThemes where there is a line
>
> aBrowser := Browser new setClass: Preferences selector: #outOfTheBox.
>
> We have a SystemBrowser AppRegistry, so we could change this to
>
> aBrowser := SystemBrowser default new setClass: Preferences
> selector: #outOfTheBox.
>
> But SystemBrowser doesn't properly describe the protocols a class
> ought to support to be a suitable system browser. So if someone uses a
> non-Browser SystemBrowser, they might get a nasty surprise.
>
> One possible solution is to add a #setClass:selector: (or rather,
> #browseClass:selector:) method to SystemBrowser. That would make the
> protocol a bit more explicit.
I'd prefer a class-side protocol similar to these:
Browser newOnClass: Preferences class selector: #outOfTheBox.
Browser fullOnClass: Preferences class selector: #outOfTheBox.
We have SystemBrowser class>>defaultOpenBrowser which is almost unused, renaming that to "openBrowser" and adding a method to open a full browser on a particular method would be nice.
- Bert -
More information about the Squeak-dev
mailing list
|