[squeak-dev] The Trunk: ToolBuilder-Morphic-ar.41.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] The Trunk: ToolBuilder-Morphic-ar.41.mcz

commits-2
Andreas Raab uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ar.41.mcz

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

Name: ToolBuilder-Morphic-ar.41
Author: ar
Time: 4 October 2009, 10:55:34 am
UUID: 8428289a-ba03-a748-ae56-e5438d98e932
Ancestors: ToolBuilder-Morphic-ar.40

Two tweaks for MorphicToolBuilder: Allow #open: to be used with pre-built Morphs so we can do something like ToolBuilder open: (ToolBuilder build: FileList). Secondly, do not register pluggable trees as updatable panes to avoid pointless transcript warning.

=============== Diff against ToolBuilder-Morphic-ar.40 ===============

Item was changed:
  ----- Method: MorphicToolBuilder>>buildPluggableTree: (in category 'pluggable widgets') -----
  buildPluggableTree: aSpec
  | widget |
  widget := PluggableTreeMorph new.
  self register: widget id: aSpec name.
  widget model: aSpec model.
  widget getSelectedPathSelector: aSpec getSelectedPath.
  widget setSelectedSelector: aSpec setSelected.
  widget getChildrenSelector: aSpec getChildren.
  widget hasChildrenSelector: aSpec hasChildren.
  widget getLabelSelector: aSpec label.
  widget getIconSelector: aSpec icon.
  widget getHelpSelector: aSpec help.
  widget getMenuSelector: aSpec menu.
  widget keystrokeActionSelector: aSpec keyPress.
  widget getRootsSelector: aSpec roots.
  widget autoDeselect: aSpec autoDeselect.
  widget dropItemSelector: aSpec dropItem.
  widget wantsDropSelector: aSpec dropAccept.
  self setFrame: aSpec frame in: widget.
  parent ifNotNil:[self add: widget to: parent].
+ " panes ifNotNil:[
- panes ifNotNil:[
  aSpec roots ifNotNil:[panes add: aSpec roots].
+ ]. "
- ].
  ^widget!

Item was changed:
  ----- Method: MorphicToolBuilder>>open: (in category 'opening') -----
  open: anObject
  "Build and open the object. Answer the widget opened."
  | morph |
+ anObject isMorph
+ ifTrue:[morph := anObject]
+ ifFalse:[morph := self build: anObject].
- morph := self build: anObject.
  (morph isKindOf: MenuMorph)
  ifTrue:[morph popUpInWorld: World].
  (morph isKindOf: SystemWindow)
  ifTrue:[morph openInWorldExtent: morph extent]
  ifFalse:[morph openInWorld].
  ^morph!