[squeak-dev] The Inbox: EToys-ct.368.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Oct 15 12:58:04 UTC 2019


A new version of EToys was added to project The Inbox:
http://source.squeak.org/inbox/EToys-ct.368.mcz

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

Name: EToys-ct.368
Author: ct
Time: 15 October 2019, 2:57:44.969129 pm
UUID: a02688f9-acfd-4240-a068-bdb24539e268
Ancestors: EToys-ct.366

Changes "revert to tile version" behavior in script editor: Instead of discarding the changed code, always use the new approach and convert the decompiled code back to tiles.

=============== Diff against EToys-ct.366 ===============

Item was added:
+ ----- Method: MethodWithInterface>>revertTileVersionFrom:for: (in category 'updating') -----
+ revertTileVersionFrom: anEditor for: playerScripted
+ 	"Only for universal tiles."
+ 
+ 	anEditor removeAllButFirstSubmorph.
+ 	anEditor insertUniversalTiles.
+ 	anEditor showingMethodPane: false!

Item was changed:
  ----- Method: ScriptEditorMorph>>revertToTileVersion (in category 'save & revert') -----
  revertToTileVersion
  	"The receiver, currently showing textual code,  is asked to revert to the last-saved tile version"
  
  	| aUserScript |
  
  	self 
  		hResizing: #shrinkWrap;
  		vResizing: #shrinkWrap.
  	aUserScript := playerScripted class userScriptForPlayer: playerScripted selector: scriptName.
+ 	aUserScript revertTileVersionFrom: self for: playerScripted.
- 	aUserScript revertToLastSavedTileVersionFor: self.
  	self currentWorld startSteppingSubmorphsOf: self!

Item was changed:
  ----- Method: ScriptEditorMorph>>toggleWhetherShowingTiles (in category 'other') -----
  toggleWhetherShowingTiles
  	"Toggle between showing the method pane and showing the tiles pane"
  
  	self showingMethodPane
  		ifFalse:				"currently showing tiles"
  			[self showSourceInScriptor]
+ 		ifTrue:					"currently showing textual source"
+ 			[self revertToTileVersion]!
- 
- 		ifTrue:				"current showing textual source"
- 			[Preferences universalTiles
- 				ifTrue: [^ self revertToTileVersion].
- 			self savedTileVersionsCount >= 1
- 				ifTrue:
- 					[(self userScriptObject lastSourceString = (playerScripted class sourceCodeAt: scriptName))
- 						ifFalse:
- 							[(self confirm: 
- 'Caution -- this script was changed
- textually; if you revert to tiles at this
- point you will lose all the changes you
- may have made textually.  Do you
- really want to do this?' translated) ifFalse: [^ self]].
- 					self revertToTileVersion]
- 				ifFalse:
- 					[Beeper beep]]!

Item was added:
+ ----- Method: UniclassScript>>revertTileVersionFrom:for: (in category 'updating') -----
+ revertTileVersionFrom: anEditor for: playerScripted
+ 
+ 	anEditor removeAllButFirstSubmorph.
+ 	Preferences universalTiles
+ 		ifFalse: [
+ 			((self playerClass >> self selector) decompile asTileSetForPlayer: playerScripted)
+ 				withIndexDo: [:tile :index |
+ 					anEditor insertTileRow: {tile} after: index].
+ 			anEditor allMorphsDo: #layoutChanged]
+ 		ifTrue: [
+ 			anEditor insertUniversalTiles].
+ 	anEditor showingMethodPane: false.
+ 	isTextuallyCoded := false.!

Item was added:
+ ----- Method: UserScript>>revertTileVersionFrom:for: (in category 'versions') -----
+ revertTileVersionFrom: anEditor for: playerScripted
+ 
+ 	anEditor removeAllButFirstSubmorph.
+ 	((self playerClass >> self selector) decompile asTileSetForPlayer: playerScripted)
+ 		withIndexDo: [:tile :index |
+ 			anEditor insertTileRow: {tile} after: index].
+ 	anEditor allMorphsDo: #layoutChanged.
+ 	anEditor showingMethodPane: false.
+ 	self becomeTextuallyCoded.!



More information about the Squeak-dev mailing list