[squeak-dev] The Trunk: Morphic-mt.1791.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Nov 19 15:41:09 UTC 2021

Marcel Taeumel uploaded a new version of Morphic to project The Trunk:

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

Name: Morphic-mt.1791
Author: mt
Time: 19 November 2021, 4:40:57.558971 pm
UUID: 446440ff-1c9e-3a4a-af60-7f6f7dc26ea7
Ancestors: Morphic-eem.1790

Open a class browser when dropping a class into the world. Extends existing method-dropping behavior.

See http://lists.squeakfoundation.org/pipermail/squeak-dev/2021-October/216734.html

=============== Diff against Morphic-eem.1790 ===============

Item was changed:
  ----- Method: PasteUpMorph>>dropSourceCode:event: (in category 'event handling') -----
  dropSourceCode: anObject event: evt
  	(anObject isMethodReference and: [anObject isValid])
  		ifTrue: [^ self dropSourceCode: anObject compiledMethod event: evt].
+ 	(anObject isBehavior or: [anObject isCompiledMethod])
- 	anObject isCompiledMethod
  		ifTrue: [
  			| tool window |
+ 			tool := anObject isBehavior
+ 				ifTrue: [Browser new
+ 					setClass: anObject]
+ 				ifFalse: [CodeHolder new
+ 					setClass: anObject methodClass
+ 					selector: anObject selector].
- 			tool := CodeHolder new
- 				setClass: anObject methodClass
- 				selector: anObject selector.
  			window := ToolBuilder open: tool.
  			window center: evt position.
  			window bounds: (window bounds translatedToBeWithin: self bounds)].
  	anObject isString
  		ifTrue: [anObject edit].!

More information about the Squeak-dev mailing list