[Fix] FileList Refactoring

Gerald Leeb leeb at anecon.com
Wed Oct 24 22:50:14 UTC 2001


'From Squeak3.1beta of 3 October 2001 [latest update: #4411] on 25 October 2001 at 12:32:43 am'!
"Change Set:		FileList Refactoring
Date:			24 October 2001
Author:			Henrik Gedenryd (Gerald Leeb)

<This refactoring is also included with the FreeType Font Support from 11 February 2001 by Henrik.

Merged fixes and changes:
FileList>>openBookFromFile ar 3/17/2001 23:42 -> BookMorph class>>openFromFile:
FileList>>openImageInWindow ar 5/30/2001 19:48 -> Form class>>openImageInWindow:
FileList>>saveGZipContents ls 1/2/2001 11:45 -> GZipReadStream class>>saveContents:
FileList>>viewGZipContents ls 1/2/2001 11:55 -> GZipReadStream class>>viewContents:
FileList>>renderFile sw 5/23/2001 13:44 -> SwikiPage class>>renderFile:


The method FileList>>itemsForFileEnding: retrieves the menu entries via ReaderServices.

Each class can register itself as ReaderService with:
	FileList registerFileReader: self.

The FileList collects the service entries for a file suffix by the message
#fileReaderServicesForSuffix: of each ReaderService.
Example:
FlashMorphReader>>fileReaderServicesForSuffix: suffix

	^(suffix = 'swf') | (suffix = '*') 
		ifTrue: [
			{SimpleServiceEntry 
				provider: self 
				label: 'open as Flash'
				selector: #openAsFlash:}]
		ifFalse: [#()]
>"!

happy squeaking
Gerald. 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: FileList Refactoring.3.cs.gz
Type: application/x-gzip-compressed
Size: 10345 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20011025/2b612848/FileListRefactoring.3.cs.bin


More information about the Squeak-dev mailing list