Karl Ramberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-kfr.680.mcz==================== Summary ====================
Name: Tools-kfr.680
Author: kfr
Time: 17 March 2016, 8:33:12.598817 pm
UUID: 3bfa20f9-3a4a-4237-9227-17dd8d2428b6
Ancestors: Tools-mt.679
Create reference to a dropped TranferMorph passenger instead of to the TranferMorph it self
=============== Diff against Tools-mt.679 ===============
Item was changed:
----- Method: Workspace>>acceptDroppingMorph:event:inMorph: (in category 'drag and drop') -----
acceptDroppingMorph: dropee event: evt inMorph: targetMorph
+ "Return the dropee to its old position, and add a reference to it at the
+ cursor point."
+ | bindingName externalName reference |
+ (dropee isKindOf: TransferMorph)
+ ifTrue: [reference := dropee passenger.
+ externalName := dropee passenger className]
+ ifFalse: [reference := dropee.
+ dropee externalName].
- "Return the dropee to its old position, and add a reference to it at the cursor point."
-
- | bindingName externalName |
- externalName := dropee externalName.
externalName := externalName isOctetString
+ ifTrue: [externalName]
+ ifFalse: ['a' , externalName].
+ bindingName := externalName withFirstCharacterDownshifted , reference identityHash printString.
+ targetMorph correctSelectionWithString: bindingName , ' '.
+ (self bindingOf: bindingName)
+ value: reference.
- ifTrue: [externalName] ifFalse: ['a' , externalName].
- bindingName := externalName translateToLowercase, dropee identityHash printString.
- targetMorph correctSelectionWithString: bindingName, ' '.
- (self bindingOf: bindingName) value: dropee.
dropee rejectDropMorphEvent: evt.
+ ^ true"success"!
- ^ true "success"
- !