[Pkg] The Trunk: Tools-bf.376.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Sep 6 11:46:41 UTC 2011

Bert Freudenberg uploaded a new version of Tools to project The Trunk:

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

Name: Tools-bf.376
Author: bf
Time: 6 September 2011, 1:45:41.088 pm
UUID: 77c9546c-de50-4c08-b937-e24fefd0cb6f
Ancestors: Tools-cmm.375

Enable drag/drop between inspectors: drag a field onto another field to replace the object in it.

=============== Diff against Tools-cmm.375 ===============

Item was changed:
  ----- Method: Inspector>>buildFieldListWith: (in category 'toolbuilder') -----
  buildFieldListWith: builder
  	| listSpec |
  	listSpec := builder pluggableListSpec new.
  		model: self;
  		list: #fieldList; 
  		getIndex: #selectionIndex; 
  		setIndex: #toggleIndex:; 
  		menu: #fieldListMenu:; 
+ 		dragItem: #dragFromFieldList:;
+ 		dropItem: #dropOnFieldList:at:;
  		keyPress: #inspectorKey:from:.

Item was added:
+ ----- Method: Inspector>>dragFromFieldList: (in category 'drag-drop') -----
+ dragFromFieldList: index
+ 	selectionIndex = index ifFalse: [self toggleIndex: index].
+ 	^self selection!

Item was added:
+ ----- Method: Inspector>>dropOnFieldList:at: (in category 'drag-drop') -----
+ dropOnFieldList: anObject at: index
+ 	selectionIndex = index ifFalse: [self toggleIndex: index].
+ 	self replaceSelectionValue: anObject.
+ 	self changed: #contents.
+ 	^ true!

More information about the Packages mailing list