[squeak-dev] The Inbox: ToolBuilder-Morphic-ct.321.mcz

commits at source.squeak.org commits at source.squeak.org
Thu Aug 25 09:20:43 UTC 2022

A new version of ToolBuilder-Morphic was added to project The Inbox:

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

Name: ToolBuilder-Morphic-ct.321
Author: ct
Time: 25 August 2022, 11:20:41.575824 am
UUID: ff7ee507-468f-4547-be2c-75a173a05d00
Ancestors: ToolBuilder-Morphic-ct.320

Adjusts order of selectors when building a tree to ensure that all setter selectors are available when updating the getters.

For instance, this change fixes the label of the following window:

	ToolBuilder open:
		(HelpBrowser new
			rootTopic: CustomHelp;
			showTopicNamed: #basicDevelopmentTools;

I did not notice any performance impact; however, I also did not test performance systematically (and I don't even know a prime example of a tree application in the trunk that uses all selectors).

=============== Diff against ToolBuilder-Morphic-ct.320 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableTree: (in category 'widgets required') -----
  buildPluggableTree: aSpec
  	| widget |
  	widget := self treeClass new.
  	self register: widget id: aSpec name.
  	widget getLabelSelector: aSpec label.
  	widget getIconSelector: aSpec icon.
  	widget model: aSpec model.
  	widget nodeClass: aSpec nodeClass.
  	widget getRootsSelector: aSpec roots.
  	widget getChildrenSelector: aSpec getChildren.
  	widget hasChildrenSelector: aSpec hasChildren.
- 	widget getSelectedSelector: aSpec getSelected.
  	widget setSelectedSelector: aSpec setSelected.
- 	widget getSelectedPathSelector: aSpec getSelectedPath.
  	widget setSelectedPathSelector: aSpec setSelectedPath.
  	widget setSelectedParentSelector: aSpec setSelectedParent.
+ 	"order matters: all setters should be available when updating the getters"
+ 	widget getSelectedSelector: aSpec getSelected.
+ 	widget getSelectedPathSelector: aSpec getSelectedPath.
  	widget getHelpSelector: aSpec help.
  	widget getMenuSelector: aSpec menu.
  	widget keystrokeActionSelector: aSpec keyPress.
  	widget autoDeselect: aSpec autoDeselect.
  	widget doubleClickSelector: aSpec doubleClick.
  	widget dropItemSelector: aSpec dropItem.
  	widget wantsDropSelector: aSpec dropAccept.
  	widget dragItemSelector: aSpec dragItem.
  	widget dragStartedSelector: aSpec dragStarted.
  	widget dragTypeSelector: aSpec dragType.
  	widget columns: aSpec columns.
  	"Override default scroll bar policies if needed. Widget will use preference values otherwise."
  	aSpec hScrollBarPolicy ifNotNil: [:policy |
  		policy caseOf: {
  			[#always] -> [widget alwaysShowHScrollBar].
  			[#never] -> [widget hideHScrollBarIndefinitely].
  			[#whenNeeded] -> [widget showHScrollBarOnlyWhenNeeded]. } ].
  	aSpec vScrollBarPolicy ifNotNil: [:policy |
  		policy caseOf: {
  			[#always] -> [widget alwaysShowVScrollBar].
  			[#never] -> [widget hideVScrollBarIndefinitely].
  			[#whenNeeded] -> [widget showVScrollBarOnlyWhenNeeded]. } ].	
  	self setFrame: aSpec frame in: widget.
  	self setLayoutHintsFor: widget spec: aSpec.
  	parent ifNotNil:[self add: widget to: parent].
  "	panes ifNotNil:[
  		aSpec roots ifNotNil:[panes add: aSpec roots].
  	].	"

More information about the Squeak-dev mailing list