[squeak-dev] The Trunk: MorphicExtras-ar.92.mcz

commits at source.squeak.org commits at source.squeak.org
Sun Sep 5 18:13:44 UTC 2010


Andreas Raab uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-ar.92.mcz

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

Name: MorphicExtras-ar.92
Author: ar
Time: 5 September 2010, 11:12:57.708 am
UUID: 6ef48c60-0c05-c649-9970-c77ec2fe4f47
Ancestors: MorphicExtras-nice.91

Restructurings to reduce package depencencies.

=============== Diff against MorphicExtras-nice.91 ===============

Item was added:
+ ----- Method: Object>>refineUndoTarget:selector:arguments:in: (in category '*MorphicExtras-Undo') -----
+ refineUndoTarget: target selector: aSymbol arguments: arguments in: refineBlock 
+ 	"Any object can override this method to refine its undo specification"
+ 
+ 	^ refineBlock
+ 		value: target
+ 		value: aSymbol
+ 		value: arguments!

Item was added:
+ ----- Method: Object>>rememberCommand: (in category '*MorphicExtras-Undo') -----
+ rememberCommand: aCommand
+ 	"Remember the given command for undo"
+ 	Preferences useUndo ifFalse: [^ self]. "get out quickly"
+ 	^ self commandHistory rememberCommand: aCommand!

Item was added:
+ ----- Method: Object>>rememberUndoableAction:named: (in category '*MorphicExtras-Undo') -----
+ rememberUndoableAction: actionBlock named: caption
+ 	| cmd result |
+ 	cmd := Command new cmdWording: caption.
+ 	cmd undoTarget: self selector: #undoFromCapturedState: argument: self capturedState.
+ 	result := actionBlock value.
+ 	cmd redoTarget: self selector: #redoFromCapturedState: argument: self capturedState.
+ 	self rememberCommand: cmd.
+ 	^ result!

Item was added:
+ ----- Method: Object>>commandHistory (in category '*MorphicExtras-Undo') -----
+ commandHistory
+ 	"Return the command history for the receiver"
+ 	| w |
+ 	(w := self currentWorld) ifNotNil: [^ w commandHistory].
+ 	^ CommandHistory new. "won't really record anything but prevent breaking things"!

Item was changed:
  ----- Method: FatBitsPaint>>editSelection (in category 'menu') -----
  editSelection
  
+        FatBitsPaint new openWith: (self selectionAsForm ifNil: [^ nil])!
-         (self selectionAsForm ifNil: [^ nil]) morphEdit!

Item was added:
+ ----- Method: Object>>undoFromCapturedState: (in category '*MorphicExtras-Undo') -----
+ undoFromCapturedState: st 
+ 	"May be overridden in subclasses.  See also capturedState"
+ 
+ 	self copyFrom: st
+ !

Item was added:
+ ----- Method: Object>>capturedState (in category '*MorphicExtras-Undo') -----
+ capturedState
+ 	"May be overridden in subclasses."
+ 
+ 	^ self shallowCopy
+ !

Item was added:
+ ----- Method: Object>>refineRedoTarget:selector:arguments:in: (in category '*MorphicExtras-Undo') -----
+ refineRedoTarget: target selector: aSymbol arguments: arguments in: refineBlock 
+ 	"Any object can override this method to refine its redo specification"
+ 
+ 	^ refineBlock
+ 		value: target
+ 		value: aSymbol
+ 		value: arguments!

Item was added:
+ ----- Method: Object>>descriptionForPartsBin (in category '*MorphicExtras-PartsBin') -----
+ descriptionForPartsBin
+ 	"If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help.  When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result.  The parameters used in the implementation below are for documentation purposes only!!"
+ 
+ 	^ DescriptionForPartsBin
+ 		formalName: 'PutFormalNameHere'
+ 		categoryList: #(PutACategoryHere MaybePutAnotherCategoryHere)
+ 		documentation: 'Put the balloon help here'
+ 		globalReceiverSymbol: #PutAGlobalHere
+ 		nativitySelector: #PutASelectorHere!

Item was added:
+ ----- Method: Object>>redoFromCapturedState: (in category '*MorphicExtras-Undo') -----
+ redoFromCapturedState: st 
+ 	"May be overridden in subclasses.  See also capturedState"
+ 
+ 	self undoFromCapturedState: st  "Simple cases are symmetric"
+ !

Item was added:
+ ----- Method: Object>>purgeAllCommands (in category '*MorphicExtras-Undo') -----
+ purgeAllCommands
+ 	"Purge all commands for this object"
+ 	Preferences useUndo ifFalse: [^ self]. "get out quickly"
+ 	self commandHistory purgeAllCommandsSuchThat: [:cmd | cmd undoTarget == self].
+ !




More information about the Squeak-dev mailing list