[squeak-dev] The Trunk: Tools-fbs.474.mcz

commits at source.squeak.org commits at source.squeak.org
Sat Jun 22 20:33:07 UTC 2013


Frank Shearar uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-fbs.474.mcz

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

Name: Tools-fbs.474
Author: fbs
Time: 22 June 2013, 9:33:27.224 pm
UUID: 6711307b-55fe-45d4-ada0-a1ff7aeda855
Ancestors: Tools-fbs.473

Convert PointerFinder to use ToolBuilder. #openInMorphic preserves the old behaviour in case I've messed up.

=============== Diff against Tools-fbs.473 ===============

Item was changed:
+ ----- Method: PointerFinder>>arrowKey:from: (in category 'pointer-list') -----
- ----- Method: PointerFinder>>arrowKey:from: (in category 'morphic ui') -----
  arrowKey: key from: aController
  	key = $i ifTrue: [^ self inspectObject].
  	^ super arrowKey: key from: aController!

Item was added:
+ ----- Method: PointerFinder>>buildWith: (in category 'ui-building') -----
+ buildWith: builder
+ 	| listSpec windowSpec |
+ 	windowSpec := builder pluggableWindowSpec new
+ 		model: self;
+ 		label: 'Pointer Finder'.
+ 
+ 	listSpec := builder pluggableListSpec new
+ 		model: self;
+ 		frame: (0 at 0 corner: 1 at 1);
+ 		list: #pointerList;
+ 		getIndex: #pointerListIndex;
+ 		setIndex: #pointerListIndex:;
+ 		menu: #menu:shifted:;
+ 		keyPress: #arrowKey:from:;
+ 		doubleClick: #inspectObject;
+ 		yourself.
+ 
+ 	windowSpec children: {listSpec}.
+ 		
+ 	^ builder build: windowSpec.!

Item was changed:
+ ----- Method: PointerFinder>>initialExtent (in category 'ui-building') -----
- ----- Method: PointerFinder>>initialExtent (in category 'morphic ui') -----
  initialExtent
  	^ 300 @ 300!

Item was changed:
+ ----- Method: PointerFinder>>inspectObject (in category 'pointer-list') -----
- ----- Method: PointerFinder>>inspectObject (in category 'morphic ui') -----
  inspectObject
  	pointerListIndex = 0 ifTrue: [^ Beeper beep].
  	(objectList at: pointerListIndex) inspect!

Item was changed:
+ ----- Method: PointerFinder>>menu:shifted: (in category 'pointer-list') -----
- ----- Method: PointerFinder>>menu:shifted: (in category 'morphic ui') -----
  menu: aMenu shifted: shifted
+ 	^ aMenu
+ 		addList: #(
+ 			('Inspect (i)' #inspectObject 'Live long and prosper!!')
+ 			-
+ 			('Search again' #searchAgain 'Search again\for the same object' withCRs));
+ 		yourself.!
- 	^ MenuMorph new
- 		defaultTarget: self;
- 		add: 'Inspect (i)' action: #inspectObject;
- 		balloonTextForLastItem: 'Live long and prosper!!';
- 		addLine;
- 		add: 'Search again' action: #searchAgain;
- 		balloonTextForLastItem: 'Search again\for the same object' withCRs;
- 		yourself!

Item was changed:
+ ----- Method: PointerFinder>>open (in category 'ui-building') -----
- ----- Method: PointerFinder>>open (in category 'morphic ui') -----
  open
+ 	^ ToolBuilder open: self.!
- 	| window list |
- 	window := (SystemWindow labelled: 'Pointer Finder')
- 		model: self.
- 	list := PluggableListMorph new
- 		doubleClickSelector: #inspectObject;
- 
- 		on: self
- 		list: #pointerList
- 		selected: #pointerListIndex
- 		changeSelected: #pointerListIndex:
- 		menu: #menu:shifted:
- 		keystroke: #arrowKey:from:.
- 		"For doubleClick to work best disable autoDeselect"
- 		list autoDeselect: false.
- 	window addMorph: list frame: (0 at 0 extent: 1 at 1).
- 	list color: Color lightMagenta.
- 	window openInWorld!

Item was added:
+ ----- Method: PointerFinder>>openInMorphic (in category 'morphic ui') -----
+ openInMorphic
+ 	| window list |
+ 	window := (SystemWindow labelled: 'Pointer Finder')
+ 		model: self.
+ 	list := PluggableListMorph new
+ 		doubleClickSelector: #inspectObject;
+ 
+ 		on: self
+ 		list: #pointerList
+ 		selected: #pointerListIndex
+ 		changeSelected: #pointerListIndex:
+ 		menu: #menu:shifted:
+ 		keystroke: #arrowKey:from:.
+ 		"For doubleClick to work best disable autoDeselect"
+ 		list autoDeselect: false.
+ 	window addMorph: list frame: (0 at 0 extent: 1 at 1).
+ 	list color: Color lightMagenta.
+ 	window openInWorld!

Item was changed:
+ ----- Method: PointerFinder>>perform:orSendTo: (in category 'message handling') -----
- ----- Method: PointerFinder>>perform:orSendTo: (in category 'morphic ui') -----
  perform: selector orSendTo: otherTarget
  	selector == #inspectObject ifTrue: [^ self inspectObject].
  	selector == #searchAgain ifTrue: [^ self searchAgain].
  	^ super perform: selector orSendTo: otherTarget!

Item was changed:
+ ----- Method: PointerFinder>>pointerList (in category 'pointer-list') -----
- ----- Method: PointerFinder>>pointerList (in category 'morphic ui') -----
  pointerList
  	^ pointerList asArray!

Item was changed:
+ ----- Method: PointerFinder>>pointerListIndex (in category 'pointer-list') -----
- ----- Method: PointerFinder>>pointerListIndex (in category 'morphic ui') -----
  pointerListIndex
  	^ pointerListIndex ifNil: [0]!

Item was changed:
+ ----- Method: PointerFinder>>pointerListIndex: (in category 'pointer-list') -----
- ----- Method: PointerFinder>>pointerListIndex: (in category 'morphic ui') -----
  pointerListIndex: anInteger
  	pointerListIndex := anInteger.
  	self changed: #pointerListIndex!

Item was changed:
+ ----- Method: PointerFinder>>searchAgain (in category 'pointer-list') -----
- ----- Method: PointerFinder>>searchAgain (in category 'morphic ui') -----
  searchAgain
  	self pointerListIndex: 0.
  	self search.
  	self changed: #pointerList!



More information about the Squeak-dev mailing list