Bert Freudenberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-bf.237.mcz
==================== Summary ====================
Name: Tools-bf.237
Author: bf
Time: 30 April 2010, 12:57:28.377 am
UUID: d6dc1fb0-8d17-494e-830b-6c2f7ed5bc3e
Ancestors: Tools-hmm.236, Tools-fbs.236
merge Tools-fbs.236:
Support for Mantis 7517: a spawned workspace has no context menu. (Make the View update when the Model changes.)
=============== Diff against Tools-hmm.236 ===============
Item was added:
+ ----- Method: Workspace>>contents: (in category 'accessing') -----
+ contents: textOrString
+ super contents: textOrString.
+ self changed: #contents.!
Bert Freudenberg uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-bf.237.mcz
==================== Summary ====================
Name: Tools-bf.237
Author: bf
Time: 30 April 2010, 12:57:28.377 am
UUID: d6dc1fb0-8d17-494e-830b-6c2f7ed5bc3e
Ancestors: Tools-hmm.236, Tools-fbs.236
merge Tools-fbs.236:
Support for Mantis 7517: a spawned workspace has no context menu. (Make the View update when the Model changes.)
=============== Diff against Tools-hmm.236 ===============
Item was added:
+ ----- Method: Workspace>>contents: (in category 'accessing') -----
+ contents: textOrString
+ super contents: textOrString.
+ self changed: #contents.!
A new version of Kernel was added to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.448.mcz
==================== Summary ====================
Name: Kernel-fbs.448
Author: fbs
Time: 28 April 2010, 10:30:41.538 pm
UUID: f46f80a9-5492-9542-9826-80a936a01df8
Ancestors: Kernel-ul.447
Support for Mantis 7517: a spawned workspace has no context menu.
=============== Diff against Kernel-ul.447 ===============
Item was changed:
----- Method: StringHolder class>>open (in category 'instance creation') -----
open
+ ^ (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'
- (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'
"Not to be confused with our own class var 'Workspace'"!
A new version of Kernel was added to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.448.mcz
==================== Summary ====================
Name: Kernel-fbs.448
Author: fbs
Time: 28 April 2010, 10:30:41.538 pm
UUID: f46f80a9-5492-9542-9826-80a936a01df8
Ancestors: Kernel-ul.447
Support for Mantis 7517: a spawned workspace has no context menu.
=============== Diff against Kernel-ul.447 ===============
Item was changed:
----- Method: StringHolder class>>open (in category 'instance creation') -----
open
+ ^ (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'
- (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'
"Not to be confused with our own class var 'Workspace'"!
A new version of Kernel was added to project The Trunk:
http://source.squeak.org/trunk/Kernel-fbs.448.mcz
==================== Summary ====================
Name: Kernel-fbs.448
Author: fbs
Time: 28 April 2010, 10:30:41.538 pm
UUID: f46f80a9-5492-9542-9826-80a936a01df8
Ancestors: Kernel-ul.447
Support for Mantis 7517: a spawned workspace has no context menu.
=============== Diff against Kernel-ul.447 ===============
Item was changed:
----- Method: StringHolder class>>open (in category 'instance creation') -----
open
+ ^ (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'
- (Smalltalk at: #Workspace ifAbsent:[self]) new openLabel: 'Workspace'
"Not to be confused with our own class var 'Workspace'"!
A new version of ToolBuilder-Morphic was added to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-fbs.58.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-fbs.58
Author: fbs
Time: 28 April 2010, 10:32:38.987 pm
UUID: 5f1f5812-f1d8-824f-8aed-a884428b9fdd
Ancestors: ToolBuilder-Morphic-ar.57
Support for Mantis 7517: a spawned workspace has no context menu. Instead of building the Workspace's model by hand, just ask the Workspace to do it itself.
=============== Diff against ToolBuilder-Morphic-ar.57 ===============
Item was changed:
----- Method: MorphicUIManager>>edit:label:accept: (in category 'ui requests') -----
edit: aText label: labelString accept: anAction
"Open an editor on the given string/text"
+ | window |
+ window := Workspace open.
+ window model acceptContents: aText.
+ window model acceptAction: anAction.
+ ^window.!
- | window holder text |
- holder := Workspace new.
- holder contents: aText.
- holder shouldStyle: false.
- text := PluggableTextMorphPlus
- on: holder
- text: #contents
- accept: #acceptContents:
- readSelection: nil
- menu: nil.
- text useDefaultStyler.
- text acceptAction: anAction.
- window := SystemWindow new.
- labelString ifNotNil:[window setLabel: labelString].
- window model: holder .
- window addMorph: text frame: (0@0 extent: 1@1).
- window openInWorld.
- ^window!
A new version of ToolBuilder-Morphic was added to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-fbs.58.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-fbs.58
Author: fbs
Time: 28 April 2010, 10:32:38.987 pm
UUID: 5f1f5812-f1d8-824f-8aed-a884428b9fdd
Ancestors: ToolBuilder-Morphic-ar.57
Support for Mantis 7517: a spawned workspace has no context menu. Instead of building the Workspace's model by hand, just ask the Workspace to do it itself.
=============== Diff against ToolBuilder-Morphic-ar.57 ===============
Item was changed:
----- Method: MorphicUIManager>>edit:label:accept: (in category 'ui requests') -----
edit: aText label: labelString accept: anAction
"Open an editor on the given string/text"
+ | window |
+ window := Workspace open.
+ window model acceptContents: aText.
+ window model acceptAction: anAction.
+ ^window.!
- | window holder text |
- holder := Workspace new.
- holder contents: aText.
- holder shouldStyle: false.
- text := PluggableTextMorphPlus
- on: holder
- text: #contents
- accept: #acceptContents:
- readSelection: nil
- menu: nil.
- text useDefaultStyler.
- text acceptAction: anAction.
- window := SystemWindow new.
- labelString ifNotNil:[window setLabel: labelString].
- window model: holder .
- window addMorph: text frame: (0@0 extent: 1@1).
- window openInWorld.
- ^window!
A new version of ToolBuilder-Morphic was added to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-fbs.58.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-fbs.58
Author: fbs
Time: 28 April 2010, 10:32:38.987 pm
UUID: 5f1f5812-f1d8-824f-8aed-a884428b9fdd
Ancestors: ToolBuilder-Morphic-ar.57
Support for Mantis 7517: a spawned workspace has no context menu. Instead of building the Workspace's model by hand, just ask the Workspace to do it itself.
=============== Diff against ToolBuilder-Morphic-ar.57 ===============
Item was changed:
----- Method: MorphicUIManager>>edit:label:accept: (in category 'ui requests') -----
edit: aText label: labelString accept: anAction
"Open an editor on the given string/text"
+ | window |
+ window := Workspace open.
+ window model acceptContents: aText.
+ window model acceptAction: anAction.
+ ^window.!
- | window holder text |
- holder := Workspace new.
- holder contents: aText.
- holder shouldStyle: false.
- text := PluggableTextMorphPlus
- on: holder
- text: #contents
- accept: #acceptContents:
- readSelection: nil
- menu: nil.
- text useDefaultStyler.
- text acceptAction: anAction.
- window := SystemWindow new.
- labelString ifNotNil:[window setLabel: labelString].
- window model: holder .
- window addMorph: text frame: (0@0 extent: 1@1).
- window openInWorld.
- ^window!
A new version of GraphicsTests was added to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-wiz.23.mcz
==================== Summary ====================
Name: GraphicsTests-wiz.23
Author: wiz
Time: 29 April 2010, 2:18:35.461 am
UUID: 98625695-e54f-407f-b627-a90e6d5dfa80
Ancestors: GraphicsTests-ar.22
This adds a test demonstrating that rectangles will change shape when their dimensions are rounded if the origin and corner are in different quadrants.
See Mantis 2453
http://bugs.squeak.org/view.php?id=2453
The condition for this to happen occurs anytime a morph with odd extent is rendered by a transformation morph.
Yours in curiosity and service, --Jerome Peace
=============== Diff against GraphicsTests-ar.22 ===============
Item was added:
+ ----- Method: RectangleTest>>testRoundingAfterHalfPixelTranslation (in category 'tests') -----
+ testRoundingAfterHalfPixelTranslation
+ "A rectangle right on the cusp of rounding changes shape if origin and
+ corner are in differenct quadrants"
+ "self debug: #testRoundingAfterHalfPixelTranslation"
+ | trouble noTrouble |
+ trouble := 10 negated asPoint rect: 10 asPoint.
+ noTrouble := trouble translateBy: 15.
+
+ 10 timesRepeat: [trouble := (trouble translateBy: 0.5) rounded].
+ 10 timesRepeat: [noTrouble := (noTrouble translateBy: 0.5) rounded].
+
+ self assert: trouble extent = noTrouble extent!
A new version of GraphicsTests was added to project The Trunk:
http://source.squeak.org/trunk/GraphicsTests-wiz.23.mcz
==================== Summary ====================
Name: GraphicsTests-wiz.23
Author: wiz
Time: 29 April 2010, 2:18:35.461 am
UUID: 98625695-e54f-407f-b627-a90e6d5dfa80
Ancestors: GraphicsTests-ar.22
This adds a test demonstrating that rectangles will change shape when their dimensions are rounded if the origin and corner are in different quadrants.
See Mantis 2453
http://bugs.squeak.org/view.php?id=2453
The condition for this to happen occurs anytime a morph with odd extent is rendered by a transformation morph.
Yours in curiosity and service, --Jerome Peace
=============== Diff against GraphicsTests-ar.22 ===============
Item was added:
+ ----- Method: RectangleTest>>testRoundingAfterHalfPixelTranslation (in category 'tests') -----
+ testRoundingAfterHalfPixelTranslation
+ "A rectangle right on the cusp of rounding changes shape if origin and
+ corner are in differenct quadrants"
+ "self debug: #testRoundingAfterHalfPixelTranslation"
+ | trouble noTrouble |
+ trouble := 10 negated asPoint rect: 10 asPoint.
+ noTrouble := trouble translateBy: 15.
+
+ 10 timesRepeat: [trouble := (trouble translateBy: 0.5) rounded].
+ 10 timesRepeat: [noTrouble := (noTrouble translateBy: 0.5) rounded].
+
+ self assert: trouble extent = noTrouble extent!