The Trunk: EToys-ct.368.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: EToys-ct.368.mcz

commits-2
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/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.!