Tony Garnock-Jones uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-tonyg.1212.mcz
==================== Summary ====================
Name: Kernel-tonyg.1212
Author: tonyg
Time: 30 January 2019, 5:20:04.609071 pm
UUID: 03bd0e4c-76d2-4be6-a7e1-58414c7fab52
Ancestors: Kernel-mt.1211
Improve promise resolution error handling via #fulfillWith:.
=============== Diff against Kernel-mt.1211 ===============
Item was added:
+ ----- Method: Promise>>fulfillWith: (in category 'resolving') -----
+ fulfillWith: aBlock
+ self fulfillWith: aBlock passErrors: rejecters isEmpty!
Item was added:
+ ----- Method: Promise>>fulfillWith:passErrors: (in category 'resolving') -----
+ fulfillWith: aBlock passErrors: aBoolean
+ "Evaluate aBlock. If it signals an exception, reject this promise with the exception
+ as the argument; if it returns a value [or another Promise], resolve this promise
+ with the result.
+
+ If aBoolean is true, and an exception is signaled, it is passed out to the caller.
+ If aBoolean is false, signaled exceptions are considered handled after the promise
+ has been rejected."
+ [ self resolveWith: aBlock value ]
+ on: Exception
+ do: [ :ex |
+ (ex isKindOf: Halt)
+ ifTrue: [ex pass]
+ ifFalse: [
+ self rejectWith: ex.
+ aBoolean ifTrue: [ ex pass ] ]]!
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.40.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.40
Author: dtl
Time: 27 January 2019, 6:03:22.297765 pm
UUID: 1a41ff47-716c-4625-9be2-38eaa73f2640
Ancestors: Chronology-Core-dtl.38
Implement Timespan>>beCanonical from Chronology-Core-cmm.15, accidentally omitted in recent UTC updates.
=============== Diff against Chronology-Core-dtl.38 ===============
Item was added:
+ ----- Method: Timespan>>beCanonical (in category 'squeak protocol') -----
+ beCanonical
+ "Chronology preserves Timespans that are extracted from DateAndTime's, making Dates, Months and Years in Squeak able to represent a true Timespan of those durations starting at a specific local DateAndTime. In case a canonical version is needed, make the receiver independent of any Timezone by removing it."
+ start makeUTC!
David T. Lewis uploaded a new version of Chronology-Tests to project The Trunk:
http://source.squeak.org/trunk/Chronology-Tests-dtl.19.mcz
==================== Summary ====================
Name: Chronology-Tests-dtl.19
Author: dtl
Time: 27 January 2019, 4:43:34.528077 pm
UUID: 00b997fd-2217-4b95-b2d3-ca2a4198f6b9
Ancestors: Chronology-Tests-dtl.18
Revert to the original version of DateAndTimeLeapTest to restore its author initials and timestamp (tlk 1/2/2004 22:05). The test now now passes, so remove it as an expected failure.
Chronology tests are green.
=============== Diff against Chronology-Tests-dtl.18 ===============
Item was removed:
- ----- Method: DateAndTimeLeapTest>>expectedFailures (in category 'failures') -----
- expectedFailures
-
- ^ #(testAsSeconds)!
Item was changed:
----- Method: DateAndTimeLeapTest>>testAsSeconds (in category 'testing') -----
testAsSeconds
+ self assert: aDuration asSeconds = 48780.
+ self assert: aDateAndTime asSeconds = 3255507180
+
+ !
- self assert: aDuration asSeconds = 48780.
- self assert: aDateAndTime asSeconds = 3255507180!
David T. Lewis uploaded a new version of Chronology-Tests to project The Trunk:
http://source.squeak.org/trunk/Chronology-Tests-dtl.18.mcz
==================== Summary ====================
Name: Chronology-Tests-dtl.18
Author: dtl
Time: 27 January 2019, 1:21:59.414215 pm
UUID: 5411396e-c5fc-4517-97ef-5cf9e7aa5dea
Ancestors: Chronology-Tests-pre.17
Do not use #makeUTC in DateAndTimeTest>>testGetSeconds because it modifies magnitude.
=============== Diff against Chronology-Tests-pre.17 ===============
Item was changed:
----- Method: DateAndTimeTest>>testGetSeconds (in category 'Tests') -----
testGetSeconds
"Verify that getSeconds represents whole seconds in the local time zone. For
a given instance of DateAndTime, changing the time zone offset changes the
local representation, but does not affect magnitude (time since a defiined
epoch). Therefore, if time zone offset changes, the asSeconds value should
not change, and the getSeconds value should change to reflect local timezone."
| dt s1 id stSeconds seconds1 seconds2 |
s1 := '2019-01-12T10:07:05.18743-05:00'.
dt := s1 asDateAndTime.
self assert: 18000 seconds negated equals: dt offset.
seconds1 := dt getSeconds.
self assert: 36425 equals: seconds1.
id := dt identityHash.
stSeconds := dt asSeconds.
+ dt localOffsetSeconds: 0. "make the receiver's timezone GMT, do not change magnitude"
- dt makeUTC. "make the receiver's timezone GMT, do not change magnitude"
self assert: id equals: dt identityHash. "same object, not a copy"
self assert: '2019-01-12T15:07:05.18743+00:00' equals: dt asString.
self assert: stSeconds equals: dt asSeconds. "magnitude unchanged"
self assert: '2019-01-12T10:07:05.18743-05:00' asDateAndTime equals: dt. "still equal"
seconds2 := dt getSeconds.
self deny: seconds1 equals: seconds2.
self assert: 54425 equals: seconds2.
!
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.38.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.38
Author: dtl
Time: 27 January 2019, 1:21:28.699596 pm
UUID: 1b64f41b-a799-4f9d-9037-cab677271baa
Ancestors: Chronology-Core-dtl.33
Change DateAndTime>>makeUTC to behave as in prior versions of Chronology, and expand its comment to explain that both magniitude and timezone offset are changed in the receiver. Update DateAndTime>>asUTC to avoid use of makeUTC.Fixes three failing unit tests.
=============== Diff against Chronology-Core-dtl.33 ===============
Item was changed:
----- Method: DateAndTime>>asUTC (in category 'ansi protocol') -----
asUTC
localOffsetSeconds = 0 ifTrue: [ ^self ].
+ ^self copy localOffsetSeconds: 0.!
- ^self copy makeUTC!
Item was changed:
----- Method: DateAndTime>>makeUTC (in category 'squeak protocol') -----
makeUTC
+ "Make the receiver's timezone UTC. This adjusts both the magnitude and
+ local offset of the receiver such that self asString remains unchanged
+ except for a zero timezone offset."
+
+ ^ self
+ utcMicroseconds: localOffsetSeconds * 1000000 + utcMicroseconds
+ offset: 0
+ !
- "Make the receiver's timezone UTC."
- localOffsetSeconds := 0!
Patrick Rein uploaded a new version of Help-Squeak-Project to project The Trunk:
http://source.squeak.org/trunk/Help-Squeak-Project-pre.65.mcz
==================== Summary ====================
Name: Help-Squeak-Project-pre.65
Author: pre
Time: 25 January 2019, 6:12:43.460527 pm
UUID: e1f3f5cb-41b0-334f-af09-83a6d3aa6484
Ancestors: Help-Squeak-Project-pre.64
Adds longer help texts to the message categories help chapters.
=============== Diff against Help-Squeak-Project-pre.64 ===============
Item was changed:
+ ----- Method: SqueakMessageCategoriesHelp class>>addAllCategoriesTopicTo: (in category 'private') -----
- ----- Method: SqueakMessageCategoriesHelp class>>addAllCategoriesTopicTo: (in category 'converting') -----
addAllCategoriesTopicTo: newTopic
| mapping allCategoriesTopic |
allCategoriesTopic := HelpTopic
title: 'All message categories'
icon: (HelpIcons iconNamed: #bookIcon)
+ contents: self allCategoriesExplanation.
- contents: 'This topic contains a list of all message categories used in the system'.
mapping := IdentityDictionary new.
SystemNavigation allBehaviorsDo: [:behavior |
((behavior organization categories
reject: [:category | category first = $*])
collect: [:category | (category findTokens: '-') first withBlanksTrimmed])
do: [:category |
(mapping at: category asLowercase asSymbol ifAbsentPut: [Set new]) add: behavior]].
mapping keys sorted do: [:categoryName |
allCategoriesTopic addSubtopic: (HelpTopic
title: categoryName
icon: (HelpIcons iconNamed: #pageIcon)
contents: (((mapping at: categoryName) collect: [:c | c printString]) sorted joinSeparatedBy: ',' , String crlf))].
^ newTopic addSubtopic: allCategoriesTopic!
Item was added:
+ ----- Method: SqueakMessageCategoriesHelp class>>allCategoriesExplanation (in category 'contents') -----
+ allCategoriesExplanation
+
+ ^ 'This chapter contains a list of all message categories used in the system and in which classes they are used.'!
Item was changed:
+ ----- Method: SqueakMessageCategoriesHelp class>>mainTopicExplanation (in category 'contents') -----
- ----- Method: SqueakMessageCategoriesHelp class>>mainTopicExplanation (in category 'converting') -----
mainTopicExplanation
+ ^ 'Message categories are useful for readers of a class to distinguish between different aspects of the class. Depending on the category users might have a different perspective on the class they look at. Selecting the right message category can be difficult as there might be several categories the method would fit into. The following guidelines might help with judging where to put methods:
+
+ 1. Look for matching method categories in common classes such as Collections, Magnitude, or Object. Depending on the domain of your method this might also include common, but specialized, classes such as Form, Morph, AbstractSound and so on.
+
+ 2. If the category you would like to use is already very full or does not describe the concern of your method very well, consider using subcategories. You can specify one by putting a dash between the category name and the subcategory name, e.g. ''menu - layout menu''.
+
+ 3. Method categories are often used to denote whether a method should only be called by an object on itself. Such methods are often sorted into the ''private'' category. This immediately indicates which methods should rather not be used by other objects. At the same time the ''private'' category is very generic and does not help readers very much. Thus, consider using a subcategory which describes the concern of the method.
+
+ This chapter further contains a more detailed description of some of the message categories and a separate subchapter listing all categories used in the system. The detailed descriptions all contain a list of example methods and, where appropriate, specify the meaning of the category in different contexts (e.g. packages or particular class hierarchies).'!
- ^ 'Message categories are useful for readers of a class to distinguish between different aspects of the class. Depening on the category users might have a different perspective on the class they look at.'!