[squeak-dev] The Inbox: EToys-tpr.321.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Mar 6 20:49:29 UTC 2018

tim Rowledge uploaded a new version of EToys to project The Inbox:

==================== Summary ====================

Name: EToys-tpr.321
Author: tpr
Time: 6 March 2018, 12:47:26.51527 pm
UUID: 082ac20c-c54a-4c29-b5a1-af5f91ca4418
Ancestors: EToys-dtl.320

Change CrosticPanel & FileInput to use the new file dialogues instead of the nasty old StandardFileMenu.

Submitted to inbox because EToys is not my world and it may be important to others to do sometihng different.

=============== Diff against EToys-dtl.320 ===============

Item was changed:
  ----- Method: CrosticPanel>>openFile (in category 'menu') -----
+ 	| fileName crostic file |
+ 	fileName := FileChooserDialog openOn: FileDirectory default suffixList: { 'crostic' } label: 'Select a Crostic file...' translated.
+ 	fileName ifNil: [^nil].
+ 	file := FileStream readOnlyFileNamed: fileName.
- 	| stdFileMenuResult crostic file |
- 	stdFileMenuResult := (StandardFileMenu new pattern: '*.crostic';
- 				 oldFileFrom: FileDirectory default) startUpWithCaption: 'Select a Crostic File...' translated.
- 	stdFileMenuResult
- 		ifNil: [^ nil].
- 	file := stdFileMenuResult directory readOnlyFileNamed: stdFileMenuResult name.
  	crostic := CrosticPanel newFromFile: file.
  	file close.
  	(self isClean
  			or: [self confirm: 'Is it OK to discard this crostic?' translated])
  		ifTrue: [self world
  				addMorphFront: (crostic position: self position).
  			self delete]
  		ifFalse: [self world addMorphFront: crostic]!

Item was changed:
  ----- Method: FileInput>>browse (in category 'accessing') -----
+ 	| fileName |
+ 	fileName := (FileChooserDialog openOn: self directory) ifNil: [^nil].
- 	| file |
- 	file := (StandardFileMenu oldFileFrom: self directory) ifNil: [^nil].
- 	file directory isNil ifTrue: [^ nil].
+ 	textMorph setText: fileName;
- 	textMorph setText: (file directory pathName, FileDirectory slash, file name);
  		hasUnacceptedEdits: true;

More information about the Squeak-dev mailing list