[squeak-dev] The Trunk: Tools-mt.1188.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Jan 26 13:21:11 UTC 2023


Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.1188.mcz

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

Name: Tools-mt.1188
Author: mt
Time: 26 January 2023, 2:21:10.241707 pm
UUID: 0e1eafb2-0e74-374b-8c3b-b47b0e7ea671
Ancestors: Tools-mt.1187

Fixes "remember window extent" for ObjectExplorer. Note that either #windowTitle or #labelString should be used for window labels at this point. See implementors and senders of #windowTitle.

=============== Diff against Tools-mt.1187 ===============

Item was changed:
  ----- Method: ObjectExplorer>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  
  	| windowSpec treeSpec textSpec buttonSpec buttonOffset tool |
  	windowSpec := builder pluggableWindowSpec new.
  	windowSpec
  		model: self;
  		children: OrderedCollection new;
+ 		label: #windowTitle.
- 		label: #label;
- 		extent: self initialExtent.
  	
  	treeSpec := builder pluggableTreeSpec new.
  	treeSpec
  		model: self;
  		nodeClass: self class nodeClass;
  		roots: #getList;
  		keyPress: #explorerKey:from:event:;
  		getSelected: #currentSelection;
  		setSelected: #currentSelection:;
  		setSelectedParent: #currentParent:;
  		menu: #genericMenu:;
  		dragItem: #getDragItem:;
  		autoDeselect: false;
  		columns: (ObjectExplorerWrapper showContentsInColumns
  			ifTrue: [{
  				[:listMorph | (listMorph filteredItems collect: [:item |
  					item preferredWidthOfColumn: 1]) max].
  				nil "take all the space"}]);
  		frame: (0 at 0 corner: 1 at 0.71).
  	windowSpec children add: treeSpec.
  
  	buttonOffset := (Preferences standardButtonFont widthOfString: 'inspect') * 3/2.
  
  	textSpec := builder pluggableCodePaneSpec new.
  	textSpec
  		model: self;
  		getText: #expression;
  		editText: #expression:;
  		menu: #codePaneMenu:shifted:;
  		help: 'Evaluate expressions for the current tree selection...' translated;
  		frame: (LayoutFrame fractions: (0 at 0.71 corner: 1 at 1) offsets: (0 at 0 corner: buttonOffset negated at 0)).
  	windowSpec children add: textSpec.
  
  	buttonSpec := builder pluggableButtonSpec new
  		model: self;
  		label: 'inspect';
  		action: #inspectObject;
  		help: 'Switch to an inspector tool';
  		frame: (LayoutFrame fractions: (1 at 0.71 corner: 1 at 1) offsets: (buttonOffset negated at 0 corner: 0 @ 0)).
  	windowSpec children add: buttonSpec.
  	
  	tool := builder build: windowSpec.
  	self changed: #expandRootsRequested.
  	^ tool!

Item was changed:
  ----- Method: ObjectExplorer>>label (in category 'accessing') -----
  label
  
+ 	self flag: #deprecated.
+ 	^ self labelString!
- 	^ [self rootObject printStringLimitedTo: 40] ifError: ['a ' , self rootObject class]!

Item was added:
+ ----- Method: ObjectExplorer>>labelString (in category 'accessing') -----
+ labelString
+ 
+ 	^ [self rootObject printStringLimitedTo: 40] ifError: ['a ' , self rootObject class]!



More information about the Squeak-dev mailing list