Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1423.mcz
==================== Summary ====================
Name: System-mt.1423
Author: mt
Time: 29 August 2023, 2:48:29.917076 pm
UUID: 0b53dd21-5ac2-6c4c-9c1e-100e56354b7d
Ancestors: System-eem.1422
Complement EToys-mt.502
=============== Diff against System-eem.1422 ===============
Item was added:
+ ----- Method: Project>>name: (in category 'accessing') -----
+ name: aString
+ changeSet ifNil: [
+ self flag: #ct. "Can we redirect to #explicitName: here instead of creating change set, or does anyone rely on this side effect?"
+ changeSet := ChangeSet new].
+ (aString isEmpty or: [aString = changeSet name])
+ ifFalse: [changeSet name: (ChangeSet uniqueNameLike: aString)]!
Marcel Taeumel uploaded a new version of EToys to project The Trunk:
http://source.squeak.org/trunk/EToys-mt.502.mcz
==================== Summary ====================
Name: EToys-mt.502
Author: mt
Time: 29 August 2023, 2:47:40.055076 pm
UUID: 76cf1a5f-7b4e-7f48-bbf2-45d619da70e9
Ancestors: EToys-mt.501
For generic project naming, move #name: setter from EToys to System. #name getter is already in System.
=============== Diff against EToys-mt.501 ===============
Item was removed:
- ----- Method: Project>>name: (in category '*Etoys-Squeakland-accessing') -----
- name: aString
- changeSet ifNil: [
- self flag: #ct. "Can we redirect to #explicitName: here instead of creating change set, or does anyone rely on this side effect?"
- changeSet := ChangeSet new].
- (aString isEmpty or: [aString = changeSet name])
- ifFalse: [changeSet name: (ChangeSet uniqueNameLike: aString)]!
I'm trying to update my weather/mqtt/plotmorph stuff for squeak 6. It's been.... a while (eek, 2017!) since I touched any of it.
The MQTT appears to be working perfectly well, which is nice. Adapting the main app to store to postresql has worked out good too (thanks to Levente's excellent PG3 package).
My puzzlement is with the PlotMorph displaying of the crosshairs etc - it is behaving very differently to the old system on 5.3. Old system - keypress + steps round a set of crosshair styles and they appear where one would expect. New system - the keypresses are detected ok but for some reason the #drawOn: method only gets run if the pointer is in the areas where the axes are displayed and not in the main graph areas. Sometihng is deciding that the cursor isn't where I think it is. I have this vague recollection that we made some changes to event positions ... but that's all I have. Ideas most welcome!
Oh, also the StackedPlotMorph example no longer seems to accept keypresses, which seems to involve focus event changes, maybe?
PlotMorph is at
MCHttpRepository
location: 'http://www.squeaksource.com/PlotMorph'
user: ''
password: ''
tim
--
tim Rowledge; tim(a)rowledge.org; http://www.rowledge.org/tim
Oxymorons: Tight slacks
David T. Lewis uploaded a new version of Chronology-Core to project The Trunk:
http://source.squeak.org/trunk/Chronology-Core-dtl.85.mcz
==================== Summary ====================
Name: Chronology-Core-dtl.85
Author: dtl
Time: 1 July 2023, 9:01:03.976799 pm
UUID: bdd66b0f-97e1-4fd5-bca6-4194eaf60096
Ancestors: Chronology-Core-mt.82
Establish protocol for aTimeZone offsetAt: aDateAndTime. Let TimeZone be abstract and let FixedTimeZone implement the previous behavior with offset represented as a constant (no DST transition support). Other packages (e.g. TZ-Olson) may implement concrete TimeZone with DST support.
Save existing TimeZone instances in the package preamble and migrate them to FixedTimeZone in the postscript.
=============== Diff against Chronology-Core-mt.82 ===============
Item was added:
+ (PackageInfo named: 'Chronology-Core') preamble: '"below, add code to be run before the loading of this package"
+
+ "Remember all instances of TimeZone. These will become FixedTimeZone in the postscript"
+ TimeZone instSize = 3 ifTrue: [
+ Smalltalk at: #TimeZoneInstances put:
+ (Dictionary newFrom: (
+ TimeZone allInstances collect: [:tz |
+ tz -> { tz offset . tz name . tz abbreviation }]))].
+ '!
Item was changed:
----- Method: DateAndTime class>>localOffset: (in category 'squeak protocol') -----
localOffset: aDuration
"Override the local time zone (for testing). This disables the #automaticTimezone: preference"
+ self localTimeZone: (FixedTimeZone offset: aDuration name: 'Local Time (override)' abbreviation: 'LTO').
- self localTimeZone: (TimeZone offset: aDuration name: 'Local Time (override)' abbreviation: 'LTO').
!
Item was changed:
----- Method: DateAndTime class>>now (in category 'ansi protocol') -----
now
+ "Answer time now as reported by #primitiveUtcWithOffset. If the automaticTimeZone
+ preference is false, use the offset provided by LocalTimeZone rather than the offset
+ provided by the primitive."
- "Answer time now as reported by #primitiveUtcWithOffset. If the primitive is not
- available, answer the Posix epoch GMT."
self automaticTimezone
ifTrue: [ ^ self basicNew initializeFromPrimitive ]
ifFalse: [ | timeArray |
timeArray := Time posixMicrosecondClockWithOffset.
^ self utcMicroseconds: timeArray first offset: self localOffsetSeconds ]
!
Item was added:
+ TimeZone subclass: #FixedTimeZone
+ instanceVariableNames: 'offset abbreviation name'
+ classVariableNames: ''
+ poolDictionaries: 'ChronologyConstants'
+ category: 'Chronology-Core'!
+
+ !FixedTimeZone commentStamp: 'dtl 6/20/2023 08:07' prior: 0!
+ FixedTimeZone is a simple class to collect the information identifying a UTC time zone. It is typically used in unit tests to specify specific time zone offsets.
+
+ offset - Duration - the time zone's offset from UTC
+ abbreviation - String - the abbreviated name for the time zone.
+ name - String - the name of the time zone.
+
+ StaticTimeZone class >> #timeZones returns an array of the known time zones
+ StaticTimeZone class >> #default returns the default time zone (Greenwich Mean Time)
+ !
Item was added:
+ ----- Method: FixedTimeZone class>>allTimeZones (in category 'accessing') -----
+ allTimeZones
+
+ ^ self timeZones , self timeZonesDST!
Item was added:
+ ----- Method: FixedTimeZone class>>default (in category 'accessing') -----
+ default
+ "Answer the default time zone - GMT"
+
+ ^ self timeZones detect: [ :tz | tz offset = Duration zero ]!
Item was added:
+ ----- Method: FixedTimeZone class>>offset:name:abbreviation: (in category 'instance creation') -----
+ offset: aDuration name: aName abbreviation: anAbbreviation
+
+ ^ self new
+ offset: aDuration;
+ name: aName;
+ abbreviation: anAbbreviation;
+ yourself
+ !
Item was added:
+ ----- Method: FixedTimeZone class>>timeZones (in category 'accessing') -----
+ timeZones
+ ^{
+ self offset: 0 hours name: 'Universal Time' abbreviation: 'UTC'.
+ self offset: 0 hours name: 'Greenwich Mean Time' abbreviation: 'GMT'.
+ self offset: 1 hours name: 'Central European Time' abbreviation: 'CET'.
+ self offset: 2 hours name: 'South African Standard Time' abbreviation: 'SAST'.
+ self offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'.
+ self offset: -7 hours name: 'Mountain Standard Time' abbreviation: 'MST'.
+ self offset: -6 hours name: 'Central Standard Time' abbreviation: 'CST'.
+ self offset: -5 hours name: 'Eastern Standard Time' abbreviation: 'EST'.
+ }!
Item was added:
+ ----- Method: FixedTimeZone class>>timeZonesDST (in category 'accessing') -----
+ timeZonesDST
+ ^{
+ self offset: 1 hours name: 'British Summer Time' abbreviation: 'BST'.
+ self offset: 2 hours name: 'Central European Summer Time' abbreviation: 'CEST'.
+ self offset: -7 hours name: 'Pacific Daylight Time' abbreviation: 'PDT'.
+ self offset: -6 hours name: 'Mountain Daylight Time' abbreviation: 'MDT'.
+ self offset: -5 hours name: 'Central Daylight Time' abbreviation: 'CDT'.
+ self offset: -4 hours name: 'Eastern Daylight Time' abbreviation: 'EDT'.
+ }!
Item was added:
+ ----- Method: FixedTimeZone>>abbreviation (in category 'accessing') -----
+ abbreviation
+
+ ^ abbreviation!
Item was added:
+ ----- Method: FixedTimeZone>>abbreviation: (in category 'accessing') -----
+ abbreviation: aString
+
+ abbreviation := aString!
Item was added:
+ ----- Method: FixedTimeZone>>name (in category 'accessing') -----
+ name
+
+ ^ name!
Item was added:
+ ----- Method: FixedTimeZone>>name: (in category 'accessing') -----
+ name: aString
+
+ name := aString!
Item was added:
+ ----- Method: FixedTimeZone>>offset: (in category 'accessing') -----
+ offset: aDuration
+
+ offset := aDuration
+ !
Item was added:
+ ----- Method: FixedTimeZone>>offsetAt: (in category 'accessing') -----
+ offsetAt: dateAndTime
+ "A FixedTimeZone has a constant offset, ignoring daylight savings time transitions"
+
+ ^ offset
+ !
Item was added:
+ ----- Method: FixedTimeZone>>printOn: (in category 'private') -----
+ printOn: aStream
+
+ super printOn: aStream.
+ aStream
+ nextPut: $(;
+ nextPutAll: self abbreviation;
+ nextPut: $)!
Item was changed:
Object subclass: #TimeZone
+ instanceVariableNames: ''
- instanceVariableNames: 'offset abbreviation name'
classVariableNames: ''
poolDictionaries: 'ChronologyConstants'
category: 'Chronology-Core'!
+ !TimeZone commentStamp: 'dtl 6/15/2023 22:27' prior: 0!
+ A TimeZone answers the UTC offset for a DateAndTime based on local rules for a geographic region. For each regional time zone, the UTC offset varies as a function of the DateAndTime, notably in support of daylight savings time changes. The UTC offset for a TimeZone also may change over time as local rules are updated for various regions and political jurisdictions.
- !TimeZone commentStamp: 'dtl 7/11/2009 15:03' prior: 0!
- TimeZone is a simple class to colect the information identifying a UTC time zone.
+ Concrete subclasses are expected to implement UTC offset rules. The simple case of FixedTimeZone implements a time zone with constant offset, which is useful for unit test support.!
- offset - Duration - the time zone's offset from UTC
- abbreviation - String - the abbreviated name for the time zone.
- name - String - the name of the time zone.
-
- TimeZone class >> #timeZones returns an array of the known time zones
- TimeZone class >> #default returns the default time zone (Grenwich Mean Time)
- !
Item was added:
+ ----- Method: TimeZone class>>allForOffset: (in category 'accessing') -----
+ allForOffset: aDuration
+
+ ^ self allTimeZones select: [:ea | ea offset = aDuration]!
Item was added:
+ ----- Method: TimeZone class>>allTimeZones (in category 'accessing') -----
+ allTimeZones
+ "Various concrete implementations may be available. These may include a
+ simple StaticTimeZone or e.g. the TZ-Olson time zone tables with daylight
+ savings time offset transitions."
+
+ ^ self allSubclasses
+ inject: OrderedCollection new
+ into: [ :result :cls |
+ (cls class includesLocalSelector: #allTimeZones)
+ ifTrue: [result addAll: cls allTimeZones].
+ result].
+ !
Item was changed:
----- Method: TimeZone class>>default (in category 'accessing') -----
default
"Answer the default time zone - GMT"
+ ^ FixedTimeZone default!
- ^ self timeZones detect: [ :tz | tz offset = Duration zero ]!
Item was removed:
- ----- Method: TimeZone class>>offset:name:abbreviation: (in category 'instance creation') -----
- offset: aDuration name: aName abbreviation: anAbbreviation
-
- ^ self new
- offset: aDuration;
- name: aName;
- abbreviation: anAbbreviation;
- yourself
- !
Item was removed:
- ----- Method: TimeZone class>>timeZones (in category 'accessing') -----
- timeZones
- ^{
- self offset: 0 hours name: 'Universal Time' abbreviation: 'UTC'.
- self offset: 0 hours name: 'Greenwich Mean Time' abbreviation: 'GMT'.
- self offset: 1 hours name: 'Central European Time' abbreviation: 'CET'.
- self offset: 2 hours name: 'South African Standard Time' abbreviation: 'SAST'.
- self offset: -8 hours name: 'Pacific Standard Time' abbreviation: 'PST'.
- self offset: -7 hours name: 'Mountain Standard Time' abbreviation: 'MST'.
- self offset: -6 hours name: 'Central Standard Time' abbreviation: 'CST'.
- self offset: -5 hours name: 'Eastern Standard Time' abbreviation: 'EST'.
- }!
Item was removed:
- ----- Method: TimeZone class>>timeZonesDST (in category 'accessing') -----
- timeZonesDST
- ^{
- self offset: 1 hours name: 'British Summer Time' abbreviation: 'BST'.
- self offset: 2 hours name: 'Central European Summer Time' abbreviation: 'CEST'.
- self offset: -7 hours name: 'Pacific Daylight Time' abbreviation: 'PDT'.
- self offset: -6 hours name: 'Mountain Daylight Time' abbreviation: 'MDT'.
- self offset: -5 hours name: 'Central Daylight Time' abbreviation: 'CDT'.
- self offset: -4 hours name: 'Eastern Daylight Time' abbreviation: 'EDT'.
- }!
Item was changed:
----- Method: TimeZone>>abbreviation (in category 'accessing') -----
abbreviation
+ ^ self subclassResponsibility!
- ^ abbreviation!
Item was removed:
- ----- Method: TimeZone>>abbreviation: (in category 'accessing') -----
- abbreviation: aString
-
- abbreviation := aString!
Item was changed:
----- Method: TimeZone>>name (in category 'accessing') -----
name
+ ^ self subclassResponsibility!
- ^ name!
Item was removed:
- ----- Method: TimeZone>>name: (in category 'accessing') -----
- name: aString
-
- name := aString!
Item was changed:
----- Method: TimeZone>>offset (in category 'accessing') -----
offset
+ "Answer the current offset"
+ ^ self offsetAt: DateAndTime basicNew initializeFromPrimitive
- ^ offset
!
Item was removed:
- ----- Method: TimeZone>>offset: (in category 'accessing') -----
- offset: aDuration
-
- offset := aDuration
- !
Item was added:
+ ----- Method: TimeZone>>offsetAt: (in category 'accessing') -----
+ offsetAt: dateAndTime
+
+ ^ self subclassResponsibility
+ !
Item was removed:
- ----- Method: TimeZone>>printOn: (in category 'private') -----
- printOn: aStream
-
- super printOn: aStream.
- aStream
- nextPut: $(;
- nextPutAll: self abbreviation;
- nextPut: $)!
Item was changed:
+ (PackageInfo named: 'Chronology-Core') postscript: '"Let all old instances of TimeZone become FixedTimeZone"
+ (Smalltalk globals removeKey: #TimeZoneInstances ifAbsent: [])
+ ifNotNil: [ :instanceData |
+ instanceData keysAndValuesDo: [ :instance :data | | newInstance |
+ newInstance := FixedTimeZone
+ offset: data first
+ name: data second
+ abbreviation: data third.
+ instance becomeForward: newInstance ]].
+ '!
- (PackageInfo named: 'Chronology-Core') postscript: 'Smalltalk removeFromStartUpList: DateAndTime'!
Christoph Thiede uploaded a new version of ToolBuilder-Morphic to project The Inbox:
http://source.squeak.org/inbox/ToolBuilder-Morphic-ct.346.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.346
Author: ct
Time: 19 August 2023, 8:26:44.340516 pm
UUID: 6e7cd1eb-b0f4-ab44-a400-f5c612379c56
Ancestors: ToolBuilder-Morphic-mt.345
After text was styled, do not scroll selection into view. The opposite leads to unintended scrolling when background styling is slow (fake this by adding 3 seconds wait in SHTextStylerST80>>#privateStyle:, typing somewhere then scrolling somewhere else) or when changing the text programmatically (e.g., through #editString).
I can't see what this is useful for. It has been there since the first version of this package. Morphic-mt.803 suggests "some jerky scrolling behavior" related to paragraph recomposition but I cannot reproduce this without further context.
=============== Diff against ToolBuilder-Morphic-mt.345 ===============
Item was changed:
----- Method: PluggableTextMorphPlus>>stylerStyled: (in category 'styling') -----
stylerStyled: styledCopyOfText
"Sent after the styler completed styling the underlying text. The behavior is similar to #handleInteraction:event: but we do not have to copy text ore make those other checks."
textMorph contents runs: styledCopyOfText runs .
textMorph paragraph composeAll.
textMorph editor recomputeSelection.
textMorph updateFromParagraph.
+ textMorph editor blinkParen.!
- textMorph editor blinkParen.
- self scrollSelectionIntoView.!
Christoph Thiede uploaded a new version of Morphic to project The Inbox:
http://source.squeak.org/inbox/Morphic-ct.2126.mcz
==================== Summary ====================
Name: Morphic-ct.2126
Author: ct
Time: 26 August 2023, 10:47:41.051023 pm
UUID: fd9b4398-075b-8c40-b1a8-8997341cf46a
Ancestors: Morphic-mt.2125
Fixes invalid state in text morphs when selecting text while something (e.g., a transcript) is updating the text.
E.g., you could trigger a nil errorNotIndexable from SmalltalkEditor(TextEditor)>>isDisjointFrom:) by doing this:
[[1 second wait.
Transcript showln: DateAndTime now] repeat] forkAt: Processor userBackgroundPriority.
"Drag to select text, wait for the next update, and release the cursor outside the window"
Make sure not to have any stepping morphs (such as browsers) in the world to reproduce this. #forceScreen does not need to be enabled.
Note that this is not a concurrency issue but also occurs when writing to the transcript from the UI process only. In general, you should not manipulate (or even access?) morphic UI state from other processes.
=============== Diff against Morphic-mt.2125 ===============
Item was changed:
----- Method: TextEditor>>mouseUp: (in category 'events') -----
mouseUp: evt
"An attempt to break up the old processRedButton code into threee phases"
"0) Click on text actions."
(self mouseUpOnTextAction: evt) ifTrue: [^ self].
"1) A 'double-click' will result in selecting the whole word."
(self hasCaret and: [oldInterval = self selectionInterval])
ifTrue: [self selectWord].
"2) For the next type-in, configure emphasis. We don't want to do this on
every key-press for performance reasons."
self setEmphasisHere.
"3) Notice selection changes."
+ (oldInterval notNil "happens if the editor has been replaced since mouseDown: (e.g., by a programmatic text change such as #appendEntry)"
+ and: [self isDisjointFrom: oldInterval])
+ ifTrue: [otherInterval := oldInterval].
- (self isDisjointFrom: oldInterval)
- ifTrue: [otherInterval := oldInterval].
self storeSelectionInParagraph.
"4) Reset mouse cursor to account for selection changes."
self updateCursorForEvent: evt.
morph removeProperty: #waitingForTextDrag.!