another pattern

Colin Putney cputney at wiresong.ca
Fri Dec 12 19:45:44 UTC 2003


Stéphane,

We had to do this kind of thing in Monticello as well. Basically it 
boils down to the fact that the file reader registry was only recently 
introduced. If you want your package to work in earlier images,  you 
need to do something like this.

Colin


On Dec 12, 2003, at 2:36 PM, ducasse wrote:

> ned
>
> I saw another pattern based on respondsTo:
>
> SARInstaller>>initialize
> 	"SARInstaller initialize"
>
> 	(FileList respondsTo: #registerFileReader:)
> 		ifTrue: [ FileList registerFileReader: self ]
>
> It is used in SMLoader
> TTFont and may be some other places.
>
> Why do you do that. Why FileList registerFileReader: self is not 
> enough.
> registerFileReader: and unregisterFileReader: methods are key methods 
> for the registration
> so not having them does not make a lot of sense.
>
> So what were your assumptions?
>
> Stef
>
>




More information about the Squeak-dev mailing list