The Trunk: Tools-mt.696.mcz

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

The Trunk: Tools-mt.696.mcz

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

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

Name: Tools-mt.696
Author: mt
Time: 4 May 2016, 1:41:03.85699 pm
UUID: 00c31901-2039-724b-b287-7e04e0b277c4
Ancestors: Tools-cmm.695

Makes inspector/explorer switch-button work in both MVC and Morphic.

=============== Diff against Tools-cmm.695 ===============

Item was changed:
  ----- Method: Inspector>>buildWith: (in category 'toolbuilder') -----
  buildWith: builder
  "Inspector openOn: SystemOrganization"
+ | windowSpec specs buttonOffset |
- | windowSpec specs buttonOffset wantsExploreButton |
- wantsExploreButton := Smalltalk isMorphic.
  buttonOffset := (Preferences standardButtonFont widthOfString: 'explore') * 3/2.
 
- self flag: #mvc. "mt: We can remove this if we can build trees in MVC and thus have a working object explorer there."
  specs := {
  (0@0 corner: 0.3@0.71)  -> [self buildFieldListWith: builder].
+ (0.3@0.0corner: 1@0.71) -> [self buildValuePaneWith: builder].
+ (LayoutFrame fractions: (0@0.71 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
+ (LayoutFrame fractions: (1@0.71 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder]
+ }.
- (0.3@0.0corner: 1@0.71) -> [self buildValuePaneWith: builder]},
- (wantsExploreButton
- ifTrue: [{
- (LayoutFrame fractions: (0@0.71 corner: 1@1) offsets: (0@0 corner: buttonOffset negated@0)) -> [self buildCodePaneWith: builder].
- (LayoutFrame fractions: (1@0.71 corner: 1@1) offsets: (buttonOffset negated@0 corner: 0 @ 0)) -> [self buildExploreButtonWith: builder].}]
- ifFalse: [{(0.0@0.71 corner: 1@1) -> [self buildCodePaneWith: builder]}]).
 
  windowSpec := self buildWindowWith: builder specs: specs.
  windowSpec extent: self initialExtent.
  ^builder build: windowSpec!

Item was changed:
  ----- Method: Inspector>>exploreObject (in category 'toolbuilder') -----
  exploreObject
  "Switch to an explorer tool."
 
+ | window currentBounds |
+ currentBounds := ToolBuilder findDefault getBoundsForWindow: self containingWindow.
+
+ "Close first because MVC fiddles around with processes."
+ self changed: #close.
+
- | window model |
  window := self object explore.
- model := window model.
 
+ "---- In MVC, the lines after this will not be executed ---"
+
+ window model setExpression: self expression.
+ ToolBuilder findDefault setBoundsForWindow: window to: currentBounds.!
- model setExpression: self expression.
- window bounds: self containingWindow bounds.
- self changed: #close.!

Item was changed:
  ----- Method: ObjectExplorer>>inspectObject (in category 'toolbuilder') -----
  inspectObject
  "Switch to an inspector tool."
 
+ | window currentBounds |
+ currentBounds := ToolBuilder findDefault getBoundsForWindow: self containingWindow.
+
+ "Close first because MVC fiddles around with processes."
+ self changed: #close.
+
- | window model |
  window := self rootObject inspect.
- model := window model.
 
+ "---- In MVC, the lines after this will not be executed ---"
+
+ window model setExpression: self expression.
+ ToolBuilder findDefault setBoundsForWindow: window to: currentBounds.!
- model setExpression: self expression.
- window bounds: self containingWindow bounds.
- self changed: #close.!