basicIsSqueak test
Ned Konz
ned at bike-nomad.com
Mon Dec 23 04:47:19 UTC 2002
On Sunday 22 December 2002 04:13 pm, Nevin Pratt wrote:
> basicIsSqueak
> Smalltalk
> at: #SqueakPage
> ifAbsent: [^ false].
> ^ true
>
> This method must reliable return 'true' if and only if the code is
> called from within a Squeak image. I couldn't think of any
> particular "reliable" test other than what I have shown above.
I wouldn't count on any class like SqueakPage that might be unloaded
in a minimal image.
I would instead test for attributes, abilities, quirks, or components
of a minimal kernel, whatever that might be.
Among the lower-level things that you shouldn't count on:
* the compiler
* plugin source
* networking or file support in its current state
* Morphic or MVC
--
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE
More information about the Squeak-dev
mailing list
|