[FIX] ImageReaderDepFix-nk

Ned Konz ned at bike-nomad.com
Wed Jul 9 13:21:01 UTC 2003


On Wednesday 09 July 2003 12:18 am, Stephane Ducasse wrote:
> Then your changes break when the class JPEGReader is not present.
> This is not a problem but this was not the intention
> of the original and stupid messages in Smalltalk

Very true. With all the recent changes, I've been finding myself 
writing a lot of code recently that looks like this:

(Smalltalk at: #SomeClass ifPresent: [ :someClass | someClass 
doSomething ]) ifNil: [ "oops, no class" ... ]

which is one of those things that probably should be turned into a 
separate method (dare I say in SystemDictionary).

I even have some of these that are nested to deal with 3.6 or 3.5 
images in which certain packages may be missing.

I wonder whether these handy but probably optional classes shouldn't 
be registered with the AppRegistry.

I do note that none of the callers of *readerClass bothered to check 
to see if they got nil, anyway.

-- 
Ned Konz
http://bike-nomad.com
GPG key ID: BEEA7EFE



More information about the Squeak-dev mailing list