Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1412.mcz
==================== Summary ====================
Name: System-eem.1412
Author: eem
Time: 25 April 2023, 12:36:56.240776 pm
UUID: f7aec916-53ca-476c-ab83-2bfdbaed529c
Ancestors: System-tpr.1411
SystemNavigation>>allPragmaSelectorsLocalToPackage: to accompany SystemNavigation>>allPragmaSelectors
=============== Diff against System-tpr.1411 ===============
Item was added:
+ ----- Method: SystemNavigation>>allPragmaSelectorsLocalToPackage: (in category 'query') -----
+ allPragmaSelectorsLocalToPackage: packageNameOrInfo
+ "Answer the set of all pragma selectors in the given package."
+ | result |
+ result := Set new.
+ (self packageInfoFor: packageNameOrInfo) actualMethodsDo:
+ [:method |
+ method pragmas do:
+ [:pragma|
+ result add: pragma keyword]].
+ ^result sorted
+
+ "self systemNavigation allPragmaSelectorsLocalToPackage: (UIManager default request: 'package')"!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1512.mcz
==================== Summary ====================
Name: Kernel-eem.1512
Author: eem
Time: 25 April 2023, 12:35:40.798521 pm
UUID: 8b933427-a783-4e69-baf8-4cfd522fccd7
Ancestors: Kernel-dtl.1511
fix spelling error in class comment
=============== Diff against Kernel-dtl.1511 ===============
Item was changed:
Object subclass: #Delay
instanceVariableNames: 'delayDuration resumptionTime delaySemaphore beingWaitedOn'
classVariableNames: 'AccessProtect ActiveDelay DelaySuspended FinishedDelay RunTimerEventLoop ScheduledDelay SuspendedDelays TimerEventLoop TimingSemaphore'
poolDictionaries: ''
category: 'Kernel-Processes'!
+ !Delay commentStamp: 'eem 2/13/2023 19:49' prior: 0!
- !Delay commentStamp: 'eem 1/5/2016 11:58' prior: 0!
I am the main way that a process may pause for some amount of time. The simplest usage is like this:
(Delay forSeconds: 5) wait.
An instance of Delay responds to the message 'wait' by suspending the caller's process for a certain amount of time. The duration of the pause is specified when the Delay is created with the message forMilliseconds: or forSeconds:. A Delay can be used again when the current wait has finished. For example, a clock process might repeatedly wait on a one-second Delay.
A delay in progress when an image snapshot is saved is resumed when the snapshot is re-started.
For a more complex example, see #testDelayOf:for:rect: .
A word of advice:
This is THE highest priority code which is run in Squeak, in other words it is time-critical. The speed of this code is critical for accurate responses, it is critical for network services, it affects every last part of the system.
In short: Don't fix it if it ain't broken!! This code isn't supposed to be beautiful, it's supposed to be fast!! The reason for duplicating code is to make it fast. The reason for not using ifNil:[]ifNotNil:[] is that the compiler may not inline those. Since the effect of changes are VERY hard to predict it is best to leave things as they are for now unless there is an actual need to change anything
Instance Variables
beingWaitedOn: <UndefinedObject|Boolean>
delayDuration: <Integer>
delaySemaphore: <Semaphore>
resumptionTime: <Integer>
beingWaitedOn
- this is set when the delay is being waited on or is unscheduled.
delayDuration
- the duration of the delay in milliseconds
delaySemaphore
- the semaphore used to suspend process(es) waiting on this delay
resumptionTime
+ - the value of the UTC microsecond clock at which the delay should resume processes waiting on it'!
- - the value of the UTC miscrosecond clock at which the delay should resume processes waiting on it'!
tim Rowledge uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-tpr.788.mcz
==================== Summary ====================
Name: Monticello-tpr.788
Author: tpr
Time: 23 April 2023, 11:47:45.749737 am
UUID: 54452883-7b3a-45d0-863b-5d47dfb1e2a4
Ancestors: Monticello-tpr.787
Attempt to ensure loading a package doesn't mess with source files when the log compilations to changes file preference is disabled. This is intended for use in headless/sourceless server type usages.
=============== Diff against Monticello-tpr.787 ===============
Item was changed:
----- Method: MCMethodDefinition>>asMethodAddition (in category 'converting') -----
asMethodAddition
^MethodAddition new
compile: source
classified: category
withStamp: timeStamp
notifying: nil
+ logSource: (SystemChangeNotifier uniqueInstance isBroadcasting and: [self actualClass acceptsLoggingOfCompilation])
- logSource: SystemChangeNotifier uniqueInstance isBroadcasting
inClass: self actualClass.!
David T. Lewis uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-dtl.1511.mcz
==================== Summary ====================
Name: Kernel-dtl.1511
Author: dtl
Time: 20 April 2023, 8:04:46.463136 pm
UUID: a97d7bda-d8ef-4241-a6a6-5b43cec1a1df
Ancestors: Kernel-mt.1510
Turn on the enableIPv6 preference for trunk.
=============== Diff against Kernel-mt.1510 ===============
Item was changed:
+ (PackageInfo named: 'Kernel') postscript: '"Turn on the enableIPv6 preference for trunk."
+
+ NetNameResolver enableIPv6: true.
+ '!
- (PackageInfo named: 'Kernel') postscript: '"Inform the VM that it should update its image format number for multiple bytecode sets"
- [CompiledCode byteCodeSetsKnownToTheVM.
- CompiledCode preferredBytecodeSetEncoderClass = EncoderForSistaV1
- ifTrue: [CompiledCode multipleBytecodeSetsActive: true]]
- on: Error do: ["missing VM support, do nothing"]'!
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.341.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.341
Author: mt
Time: 20 April 2023, 4:51:05.321914 pm
UUID: 045ae05b-fe2a-e749-b001-a08ffc80a669
Ancestors: ToolBuilder-Morphic-mt.340
Regarding tree widgets and selection update after type-in filters, document the challenge with prioritizing prefix matches. This is a feature we have in list widgets and it would be nice to have it also in tree widgets as it simplifies keyboard navigation.
=============== Diff against ToolBuilder-Morphic-mt.340 ===============
Item was changed:
----- Method: PluggableTreeMorph>>updateSelectionAfterFilter (in category 'updating') -----
updateSelectionAfterFilter
"Filter has changed. The current selection might not be visible anymore. Update it accordingly."
| focus currentParent firstMatch |
self hoveredMorph: nil.
((focus := self selectedMorph) notNil and: [focus isFilterMatch])
ifTrue: [^ self "no change, keep view stable"].
self filterMode = #siblings
ifTrue: [ "Consider parent for local scope"
firstMatch := (currentParent := self selectedParentMorph)
ifNil: [self firstFilteredItem "i.e., any visible root"]
ifNotNil: [:pm | pm firstVisibleChild]]
ifFalse: [ "#all, #visible -- any filter match will do"
firstMatch := focus
ifNil: [self firstFilteredItem]
ifNotNil: [:fm | self firstFilteredItemAfterSelection
ifNil: [self firstFilteredItem]]].
+
+ self flag: #todo. "mt: Give priority to matching prefixes. This is tricky at the moment
+ because (1) #isFilterMatch has no access to the current filterOffsets until the first redraw
+ and (2) due to tab-split columns, a 'prefix' could as well be a within-match if a tab
+ character is directly in front of it. For now, leave it without this feature and expect
+ users to pre-attentively make out matching prefixes quickly while browsing the
+ filter results."
"Select the first match only if current selection does not match anymore."
self setSelectedMorph: firstMatch. "New parent for #all or #visible possible"
self scrollSelectionAndExtraIntoView.
"Keep parent visible to provide context information. Ensure visibility of current selection."
self scrollSelectionParentIntoView: (currentParent ifNil: [self selectedParentMorph]).!
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.340.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.340
Author: mt
Time: 18 April 2023, 2:32:09.744406 pm
UUID: c7d228b6-0901-4e4f-9182-90485af5e492
Ancestors: ToolBuilder-Morphic-mt.339
In tree widgets, fixes issue with #isExpanded combined with #all filter mode. Also keep the current selection expanded when clearing an #all filter.
=============== Diff against ToolBuilder-Morphic-mt.339 ===============
Item was changed:
----- Method: PluggableTreeMorph>>collapseAllButSelection (in category 'filtering') -----
collapseAllButSelection
"If the filterMode is set to #all, filtering will expand (and collapse) nodes. Thus, it is can be useful to collapse all nodes again but show the current selection to get an overview again when removing the filter."
+ | selectedPath wasExpanded |
+ autoExpand == true ifTrue: [^ self].
- | selectedPath |
self fixateSelectionDuring: [
selectedPath := self selectedPath.
+ wasExpanded := selectedMorph notNil and: [selectedMorph isExpanded].
selectedMorph := selectedMorphIndex := nil. "Avoid selection update via #collapseAll. See #noteRemovalOfAll:."
self collapseAll.
+ self selectedPath: selectedPath.
+ wasExpanded ifTrue: [self toggleExpandedState: selectedMorph]].!
- self selectedPath: selectedPath].!
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.338.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.338
Author: mt
Time: 17 April 2023, 4:07:37.770908 pm
UUID: a45f7878-de1c-a74c-b7ff-4e0087df2a19
Ancestors: ToolBuilder-Morphic-mt.337
In tree widgets, make type-in filter keyboard navigation also work for #all and #visible filter-modes, not just #siblings.
=============== Diff against ToolBuilder-Morphic-mt.337 ===============
Item was changed:
----- Method: PluggableTreeMorph>>collapseAllButSelection (in category 'filtering') -----
collapseAllButSelection
"If the filterMode is set to #all, filtering will expand (and collapse) nodes. Thus, it is can be useful to collapse all nodes again but show the current selection to get an overview again when removing the filter."
| selectedPath |
self fixateSelectionDuring: [
selectedPath := self selectedPath.
+ selectedMorph := selectedMorphIndex := nil. "Avoid selection update via #collapseAll. See #noteRemovalOfAll:."
- selectedMorph := nil. "Avoid selection update via #collapseAll. See #noteRemovalOfAll:."
self collapseAll.
self selectedPath: selectedPath].!
Item was changed:
----- Method: PluggableTreeMorph>>filterTree (in category 'filtering') -----
filterTree
- | currentParent firstMatch |
self filterMode = #siblings ifTrue: [
"For expanded selections, we assume that the user is already looking at the children. This is beneficial for the ObjectExplorer and a useful heuristic in general."
self selectedMorph ifNotNil: [:focus |
focus isExpanded ifTrue: [self setSelectedMorph: focus firstChild]]].
"Update the filter, try to keep selection stable."
self fixateSelectionDuring: [self filterTreeNow].
"Now update selection and scroll position as needed."
+ self updateSelectionAfterFilter.!
- self hoveredMorph: nil.
- currentParent := self selectedParentMorph.
- firstMatch := currentParent
- ifNil: [self roots detect: [:ea | ea visible]]
- ifNotNil: [:pm | pm firstVisibleChild].
- self selectedMorph
- ifNil: [self scrollToTop]
- ifNotNil: [:focus |
- focus visible ifFalse: [
- "Select the first match only if current selection does not match anymore."
- self setSelectedMorph: firstMatch.
- self scrollSelectionAndExtraIntoView.
- "Keep parent visible to provide context information. Ensure visibility of current selection."
- self scrollSelectionParentIntoView: currentParent]].!
Item was changed:
----- Method: PluggableTreeMorph>>filterTreeButSelection (in category 'filtering') -----
filterTreeButSelection
"Similar to #collapseAllButSelection. Apply the filter but make sure the current selection stays unchanged."
| selectedPath |
self fixateSelectionDuring: [
selectedPath := self selectedPath.
+ selectedMorph := selectedMorphIndex := nil. "Avoid selection update via #collapseAll. See #noteRemovalOfAll:."
- selectedMorph := nil. "Avoid selection update via #collapseAll. See #noteRemovalOfAll:."
self filterTree.
self selectedPath: selectedPath].!
Item was added:
+ ----- Method: PluggableTreeMorph>>updateSelectionAfterFilter (in category 'updating') -----
+ updateSelectionAfterFilter
+ "Filter has changed. The current selection might not be visible anymore. Update it accordingly."
+
+ | focus currentParent firstMatch |
+ self hoveredMorph: nil.
+ ((focus := self selectedMorph) notNil and: [focus isFilterMatch])
+ ifTrue: [^ self "no change, keep view stable"].
+
+ self filterMode = #siblings
+ ifTrue: [ "Consider parent for local scope"
+ firstMatch := (currentParent := self selectedParentMorph)
+ ifNil: [self roots detect: [:ea | ea visible]]
+ ifNotNil: [:pm | pm firstVisibleChild]]
+ ifFalse: [ "#all, #visible -- any filter match will do"
+ firstMatch := focus
+ ifNil: [scroller submorphs detect: [:m | m isFilterMatch]]
+ ifNotNil: [:fm |
+ scroller submorphs at: (scroller submorphs
+ findFirst: [:m | m isFilterMatch]
+ startingAt: self getSelectionIndex)]].
+
+ "Select the first match only if current selection does not match anymore."
+ self setSelectedMorph: firstMatch. "New parent for #all or #visible possible"
+ self scrollSelectionAndExtraIntoView.
+
+ "Keep parent visible to provide context information. Ensure visibility of current selection."
+ self scrollSelectionParentIntoView: (currentParent ifNil: [self selectedParentMorph]).!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2107.mcz
==================== Summary ====================
Name: Morphic-mt.2107
Author: mt
Time: 17 April 2023, 4:06:28.838908 pm
UUID: 478a1971-c2da-7341-badf-ca64163a8c22
Ancestors: Morphic-mt.2106
In tree widgets, have the selected index quickly available to enumerate submorphs around the current selection efficiently.
=============== Diff against Morphic-mt.2106 ===============
Item was changed:
ScrollPane subclass: #SimpleHierarchicalListMorph
+ instanceVariableNames: 'selectedMorph selectedMorphIndex hoveredMorph getListSelector keystrokeActionSelector autoDeselect autoExpand autoExpandSelector columns columnsCache sortingSelector getSelectionSelector setSelectionSelector potentialDropMorph lineColor font textColor'
- instanceVariableNames: 'selectedMorph hoveredMorph getListSelector keystrokeActionSelector autoDeselect autoExpand autoExpandSelector columns columnsCache sortingSelector getSelectionSelector setSelectionSelector potentialDropMorph lineColor font textColor'
classVariableNames: 'ExpandAllLimit ExpandedForm NotExpandedForm WrappedNavigation'
poolDictionaries: ''
category: 'Morphic-Explorer'!
!SimpleHierarchicalListMorph commentStamp: 'ls 3/1/2004 12:15' prior: 0!
Display a hierarchical list of items. Each item should be wrapped with a ListItemWrapper.
For a simple example, look at submorphsExample. For beefier examples, look at ObjectExplorer or FileList2.!
Item was changed:
----- Method: SimpleHierarchicalListMorph>>adjustSubmorphPositions (in category 'private') -----
adjustSubmorphPositions
| p |
p := 0@0.
scroller submorphsDo: [ :each | | h |
each visible ifTrue: [
h := each height.
each privateBounds: (p extent: self preferredSubmorphWidth@h).
p := p + (0@h) ]].
scroller layoutChanged.
+ selectedMorphIndex := nil. "to catch all collapse/expand events"
self
clearColumnsCache;
changed;
layoutChanged;
setScrollDeltas.
!
Item was changed:
----- Method: SimpleHierarchicalListMorph>>getSelectionIndex (in category 'keyboard navigation') -----
getSelectionIndex
+ ^ selectedMorphIndex ifNil: [selectedMorphIndex := scroller submorphs indexOf: selectedMorph]!
- ^scroller submorphs indexOf: selectedMorph!
Item was changed:
----- Method: SimpleHierarchicalListMorph>>selectedMorph: (in category 'selection') -----
selectedMorph: aMorph
self unhighlightSelection.
selectedMorph := aMorph.
+ selectedMorphIndex := nil.
self highlightSelection.
self scrollSelectionIntoView.!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1032.mcz
==================== Summary ====================
Name: Collections-mt.1032
Author: mt
Time: 17 April 2023, 4:03:53.258908 pm
UUID: 6768fb68-7c07-f64d-9349-7f4a00879ded
Ancestors: Collections-mt.1031
Adds missing #findFirst:startingAt: to complement existing #findLast:startingAt:.
=============== Diff against Collections-mt.1031 ===============
Item was added:
+ ----- Method: SequenceableCollection>>findFirst:startingAt: (in category 'enumerating') -----
+ findFirst: aBlock startingAt: i
+ "Return the index of my first element with index >= i for which aBlock evaluates as true."
+
+ | index |
+ index := i - 1.
+ [(index := index + 1) <= self size] whileTrue:
+ [(aBlock value: (self at: index)) ifTrue: [^index]].
+ ^ 0!