[squeak-dev] StringHolder subclass: FileList?

H. Hirzel hannes.hirzel at gmail.com
Thu Oct 5 08:43:04 UTC 2017


Hello

Tim R. asked  about the FileList hierarchy [1] (see
FileList2>listForPattern(s): and MessageSend abuse thread)

On 10/4/17 9:27 PM, tim Rowledge wrote:

>>    Don’t suppose you recall anything about why it is subclassed from StringHolder?
>>    That really does seem odd...

Bob A:
>Well, the whole point is to provide a view of the contents of a file which you can read, edit >and save. The rest is just how to get that content in the first place. So, it's a StringHolder >with some extra buttons attached.

Pharo directly subclasses Model [2]

I think the current solution of subclassing StringHolder is OK.

Interesting to note that if you select an image file in the file list
you get the dimensions of the image file plus a thumbnail view of it.
Very nice.

I agree that a complete rewrite of FileList (and subclasses) is a
worthwhile thing to do.

Regards
Hannes


[1] FileList printHierarchy '
ProtoObject #()
	Object #()
		Model #(''dependents'')
			StringHolder #(''contents'')
				FileList #(''fileName'' ''directory'' ''volList'' ''volListIndex''
''list'' ''listIndex''
                                              ''pattern'' ''sortMode''
''brevityState'' ''directoryCache''
                                               ''lastGraphicsExtent'')
					FileList2 #(''showDirsInFileList'' ''currentDirectorySelected''
                                               ''fileSelectionBlock''
''dirSelectionBlock''
                                               ''optionalButtonSpecs''
''modalView''
                                               ''directoryChangeBlock'' ''ok'')
						FileChooser #(''view'' ''caption'' ''captionMorph'' ''captionBox''

''cancelButton'' ''okButton'' ''buttonPane''

''captionPane'' ''directoryPane''

''filePane'' ''showShortFileNames'')
					PluggableFileList #(''accepted'' ''fileFilterBlock'' ''canAcceptBlock''

''validateBlock'' ''newFiles'' ''prompt'' ''resultBlo


[2] FileList in Pharo6:
    ProtoObject #()
	Object #()
		Model #(#dependents #announceur)
			FileList #(#reference #volumeList #volumeListIndex #list #listIndex
#pattern #brevityState #dirSelectionBlock #modalView #ok #contents
#optionalButtonSpecs #grid #fileEncoding #sortBlock #baseLabel
#configuredServices #sourceTextModel)


More information about the Squeak-dev mailing list