Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.208.mcz
==================== Summary ====================
Name: ST80-mt.208
Author: mt
Time: 4 May 2016, 3:44:43.013971 pm
UUID: f7c73b93-4d3e-2841-af17-ba6d70a046c6
Ancestors: ST80-mt.207
Until we find a better way, let projects provide generic means of composing DisplayText into a Form. Used, for example, for our emergency debugger.
=============== Diff against ST80-mt.207 ===============
Item was added:
+ ----- Method: MVCProject>>composeDisplayTextIntoForm: (in category 'utilities') -----
+ composeDisplayTextIntoForm: displayText
+
+ ^ displayText asParagraph asForm!
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.822.mcz
==================== Summary ====================
Name: System-mt.822
Author: mt
Time: 4 May 2016, 3:41:22.823971 pm
UUID: 303d3668-90ba-ac46-b7d4-847e945efeb8
Ancestors: System-dtl.821
Until we find a better way, let projects provide generic means of composing DisplayText into a Form. Used, for example, for our emergency debugger.
=============== Diff against System-dtl.821 ===============
Item was added:
+ ----- Method: Project>>composeDisplayTextIntoForm: (in category 'utilities') -----
+ composeDisplayTextIntoForm: displayText
+ "Compose the given display text into a form. This is at project level so that UI-specific mechanisms can be used. We may want to make this independent from Morphic or MVC in the future. Good-looking text rendering is good for any user interface."
+
+ | port form font width height lines |
+ font := displayText textStyle defaultFont.
+ lines := displayText string lines.
+
+ width := lines
+ ifEmpty: [1]
+ ifNotEmpty: [(lines collect: [:line | font widthOfString: line]) max].
+ height := font height * lines size.
+
+ form := Form extent: width@height depth: 32.
+ port := BitBlt toForm: form.
+
+ "1) Fill background."
+ port
+ fill: form boundingBox
+ fillColor: displayText backgroundColor
+ rule: Form over.
+
+ "2) Draw text lines."
+ port combinationRule: Form paint.
+ font
+ installOn: port
+ foregroundColor: displayText foregroundColor
+ backgroundColor: Color transparent.
+
+ lines withIndexDo: [:line :index |
+ font
+ displayString: line
+ on: port
+ from: 1
+ to: line size
+ at: 0@((index-1) * font height)
+ kern: 0].
+
+ ^ form!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.207.mcz
==================== Summary ====================
Name: ST80-mt.207
Author: mt
Time: 4 May 2016, 2:30:01.391971 pm
UUID: 5acb8b03-a5ea-614c-ab2e-b8151e67ff80
Ancestors: ST80-mt.206
Ensure string representation of items in MVC item views. Useful in general for erroneous models and in specific for tree view fall-back in MVC tool builder.
=============== Diff against ST80-mt.206 ===============
Item was added:
+ ----- Method: PluggableListViewByItem>>getList (in category 'as yet unclassified') -----
+ getList
+ "Ensure that there are only strings in that list."
+
+ ^ super getList collect: [:ea | ea asString]!
Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.96.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-mt.96
Author: mt
Time: 4 May 2016, 1:36:48.21799 pm
UUID: 9c962b8d-8449-834d-9f5c-82e7b851768a
Ancestors: ToolBuilder-Kernel-mt.95
Add a general hook to retrieve bounds for a window.
=============== Diff against ToolBuilder-Kernel-mt.95 ===============
Item was added:
+ ----- Method: ToolBuilder class>>getBoundsForWindow: (in category 'services') -----
+ getBoundsForWindow: window
+ "Return the bounds for the given window."
+
+ self subclassResponsibility.!
Item was added:
+ ----- Method: ToolBuilder class>>setBoundsForWindow:to: (in category 'services') -----
+ setBoundsForWindow: window to: rectangle
+ "Set the bounds for the given window."
+
+ self subclassResponsibility.!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.206.mcz
==================== Summary ====================
Name: ST80-mt.206
Author: mt
Time: 4 May 2016, 1:35:41.04699 pm
UUID: 69676c6d-8920-3746-a21f-d63502700535
Ancestors: ST80-dtl.205
Consistently with Morphic's system windows, allow models to close windows also in MVC.
=============== Diff against ST80-dtl.205 ===============
Item was changed:
----- Method: StandardSystemView>>update: (in category 'updating') -----
update: aSymbol
aSymbol = #relabel
ifTrue: [^ self setLabelTo: model labelString].
+ aSymbol = #close
+ ifTrue: [^ self controller closeAndUnscheduleNoTerminate].
+
^ super update: aSymbol!
Nicolas Cellier uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-nice.1017.mcz
==================== Summary ====================
Name: Kernel-nice.1017
Author: nice
Time: 4 May 2016, 11:38:09.824683 am
UUID: 1ffcd709-05e7-2947-b002-099b73ad8920
Ancestors: Kernel-mt.1016
Fix slip in floorLog: fallback, 10 was hardcoded instead of radix parameter
=============== Diff against Kernel-mt.1016 ===============
Item was changed:
----- Method: Fraction>>floorLog: (in category 'mathematical functions') -----
floorLog: radix
"Unlike super, this version is exact when radix is integer"
| d n |
+ radix isInteger ifFalse: [^super floorLog: radix].
- radix isInteger ifFalse: [^super floorLog: 10].
n := numerator floorLog: radix.
d := denominator floorLog: radix.
^(numerator * (radix raisedTo: d))
< (denominator * (radix raisedTo: n))
ifTrue: [n - d - 1]
ifFalse: [n - d]!
Item was changed:
----- Method: Integer>>floorLog: (in category 'mathematical functions') -----
floorLog: radix
"Unlike super, this version is exact when radix is integer"
+ radix isInteger ifFalse: [^super floorLog: radix].
- radix isInteger ifFalse: [^super floorLog: 10].
self <= 0 ifTrue: [^DomainError signal: 'floorLog: is only defined for x > 0.0'].
^(self numberOfDigitsInBase: radix) - 1!