Christoph Thiede uploaded a new version of Morphic to project The Treated Inbox:
http://source.squeak.org/treated/Morphic-ct.2130.mcz
==================== Summary ====================
Name: Morphic-ct.2130
Author: ct
Time: 11 September 2023, 6:18:59.713063 pm
UUID: 3f9268df-f04d-4d4c-bfee-7651b41c1443
Ancestors: Morphic-mt.2122
Avoids installing a new editor in TextMorph when receiving #textStyle:. Regression from Morphic-ct.2060.
An editor is not expected before the TextMorph has been added to a world/owner. For instance, #fillsOwner: before #openInWorld was previously broken, and thus the BannerMorph required for Objectland.
Please review. I'm not entirely sure whether I identified the correct invariant or whether TextContainer>>#bounds should instead check for a nil owner. Do BannerMorph example openInWorld to reproduce.
=============== Diff against Morphic-mt.2122 ===============
Item was changed:
----- Method: TextMorph>>textStyle: (in category 'accessing') -----
textStyle: aTextStyle
"Change the receiver's set of fonts to aTextStyle. You can access those fonts via the TextFontChange text attribute. If you want to enfore a specific font face or point size, use #font: instead. NOTE THAT you must provide either a freshly created instance of TextStyle or a copy of an existing one. NEVER use, for example, TextStyle class >> #default directly. Also see senders and implementors of #asNewTextStyle."
| previousSelection |
textStyle := aTextStyle.
+ previousSelection := editor ifNotNil: [editor selectionInterval].
- previousSelection := self selectionInterval.
self releaseParagraph; changed.
previousSelection ifNotNil: [self selectionInterval: previousSelection].!
Christoph Thiede uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ct.1427.mcz
==================== Summary ====================
Name: System-ct.1427
Author: ct
Time: 12 October 2023, 7:11:28.775818 pm
UUID: ba3f6275-e7ed-4344-b3cf-78ee6190e393
Ancestors: System-codefrau.1426
Adds Marius Dörbandt (mad) to the list of authors. Welcome Marius! :-)
=============== Diff against System-codefrau.1426 ===============
Item was changed:
----- Method: SystemNavigation class>>privateAuthorsRaw (in category 'class initialization') -----
(excessive size, no diff calculated)
Item was changed:
+ (PackageInfo named: 'System') postscript: 'Smalltalk installLowSpaceWatcher.
+
+ SystemNavigation initializeAuthors. "Adds Marius Dörbandt (mad)"'!
- (PackageInfo named: 'System') postscript: 'Smalltalk installLowSpaceWatcher.'!
Christoph Thiede uploaded a new version of Sound to project The Trunk:
http://source.squeak.org/trunk/Sound-ct.94.mcz
==================== Summary ====================
Name: Sound-ct.94
Author: ct
Time: 12 October 2023, 7:04:09.945818 pm
UUID: 6f15da49-9689-7148-9b86-e9f11ac8db27
Ancestors: Sound-tpr.93
Merges and revises Sound-mad.90, which fixes endianness issues for storing SampledSounds analogously to Sound-ct.71.
Revision: Also fixes this issue for LoopedSampledSound. Extracts AbstractSound>>#storeSamples:count:bigEndian:on:.
Note: I had to move Sound-mad.90 to the treated inbox because it snapshot only contained the patched version.
=============== Diff against Sound-tpr.93 ===============
Item was added:
+ ----- Method: AbstractSound>>storeSamples:count:bigEndian:on: (in category 'file i/o') -----
+ storeSamples: samples count: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
+
+ | reverseBytes streamDirect |
+ streamDirect := aBinaryStream isKindOf: StandardFileStream.
+ reverseBytes := (bigEndianFlag xor: Smalltalk isBigEndian) xor: streamDirect not.
+ reverseBytes ifTrue: [samples reverseEndianness].
+ streamDirect
+ ifTrue: "optimization for files: write sound buffer directly to file"
+ [aBinaryStream next: (samples size // 2 min: samplesToStore // 2) putAll: samples startingAt: 1] "size in words"
+ ifFalse: "for non-file streams:"
+ [1 to: (samples monoSampleCount min: samplesToStore) do: [:i | aBinaryStream int16: (samples at: i)]].
+ reverseBytes ifTrue: [samples reverseEndianness]. "restore to original endianness"!
Item was changed:
----- Method: LoopedSampledSound>>storeSampleCount:bigEndian:on: (in category 'file i/o') -----
storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
+ "Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files). If self isStereo is true, both channels are stored, creating a stereo file. Otherwise, only the left channel is stored, creating a mono file."
- "Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files)."
+ (self isStereo or: [scaledIndexIncr ~= LoopIndexScaleFactor]) ifTrue: [
- | reverseBytes |
- (self isStereo or: [self samplingRate ~= originalSamplingRate]) ifTrue: [
^ super storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream].
"optimization: if I'm not stereo and sampling rates match, just store my buffer"
+ ^ self storeSamples: leftSamples count: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream!
- reverseBytes := bigEndianFlag ~= Smalltalk isBigEndian.
- reverseBytes ifTrue: [leftSamples reverseEndianness].
- (aBinaryStream isKindOf: StandardFileStream)
- ifTrue: [ "optimization for files: write sound buffer directly to file"
- aBinaryStream next: (leftSamples size // 2) putAll: leftSamples startingAt: 1] "size in words"
- ifFalse: [ "for non-file streams:"
- 1 to: leftSamples monoSampleCount do: [:i | aBinaryStream int16: (leftSamples at: i)]].
- reverseBytes ifTrue: [leftSamples reverseEndianness]. "restore to original endianness"
- !
Item was changed:
----- Method: SampledSound>>storeSampleCount:bigEndian:on: (in category 'file i/o') -----
storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream
"Store my samples on the given stream at the current SoundPlayer sampling rate. If bigFlag is true, then each 16-bit sample is stored most-significant byte first (AIFF files), otherwise it is stored least-significant byte first (WAV files)."
- | reverseBytes |
self samplingRate ~= originalSamplingRate ifTrue: [
^ super storeSampleCount: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream].
+
-
"optimization: if sampling rates match, just store my buffer"
+ ^ self storeSamples: samples count: samplesToStore bigEndian: bigEndianFlag on: aBinaryStream!
- reverseBytes := bigEndianFlag ~= Smalltalk isBigEndian.
- reverseBytes ifTrue: [samples reverseEndianness].
- (aBinaryStream isKindOf: StandardFileStream)
- ifTrue: [ "optimization for files: write sound buffer directly to file"
- aBinaryStream next: (samples size // 2) putAll: samples startingAt: 1] "size in words"
- ifFalse: [ "for non-file streams:"
- 1 to: samples monoSampleCount do: [:i | aBinaryStream int16: (samples at: i)]].
- reverseBytes ifTrue: [samples reverseEndianness]. "restore to original endianness"
- !
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-ct.1032.mcz
==================== Summary ====================
Name: Tools-ct.1032
Author: ct
Time: 10 March 2021, 6:51:33.356304 pm
UUID: 897e4ea2-3740-6a45-a054-d7da65105568
Ancestors: Tools-mt.1030
In the Message Names tool, show definition, comment, and hierarchy for class hits. In particular helpful to find out efficiently whether a selector belongs to a binding or to an actual class.
=============== Diff against Tools-mt.1030 ===============
Item was changed:
----- Method: MessageNames>>computeMessageList (in category 'search') -----
computeMessageList
+ | selector |
+ selectorListIndex = 0 ifTrue: [^ #()].
+
+ selector := selectorList at: selectorListIndex.
+ ^ (selector first isUppercase ifTrue: [Smalltalk classNamed: selector])
+ ifNotNil: [:class |
+ class := Smalltalk classNamed: selector.
+ #(Definition Comment Hierarchy) collect: [:sel |
+ MethodReference class: class selector: sel] ]
+ ifNil: [self systemNavigation allImplementorsOf: selector]!
- ^ selectorListIndex = 0
- ifTrue: [#()]
- ifFalse: [self systemNavigation
- allImplementorsOf: (selectorList at: selectorListIndex)]!
Item was changed:
----- Method: MessageNames>>selectedMessageName (in category 'message list') -----
selectedMessageName
selectorList basicSize = 0 ifTrue: [^ nil]. "Deals with selectorList nil or empty"
+ ^super selectedMessageName ifNil: [
+ "only message name selected"
+ selectorList at: (selectorListIndex max: 1) ifAbsent: [nil] "If no selection we can still find a selector"]!
- ^selectorList at: (selectorListIndex max: 1) ifAbsent: [nil] "If no selection we can still find a selector"!
Item was changed:
----- Method: MessageSet>>aboutToStyle: (in category 'code pane') -----
+ aboutToStyle: aStyler
+ "This is a notification that aStyler is about to re-style its text.
+ Set the classOrMetaClass in aStyler, so that identifiers will be resolved correctly.
- aboutToStyle: aPluggableShoutMorphOrView
- "This is a notification that aPluggableShoutMorphOrView is about to re-style its text.
- Set the classOrMetaClass in aPluggableShoutMorphOrView, so that identifiers
- will be resolved correctly.
Answer true to allow styling to proceed, or false to veto the styling"
| selectedMessageName showingMethod |
self showingSource ifFalse: [^false].
selectedMessageName := self selectedMessageName.
showingMethod := (#(Comment Definition Hierarchy) includes: selectedMessageName) not.
+ aStyler parseAMethod: showingMethod.
"Hack!! setting classOrMetaClass: to nil allows doit or class definition colouring."
+ aStyler classOrMetaClass: (showingMethod ifTrue: [self selectedClassOrMetaClass]).
- aPluggableShoutMorphOrView classOrMetaClass: (showingMethod ifTrue: [self selectedClassOrMetaClass]).
^(#(Comment Hierarchy) includes: selectedMessageName) not!
Item was changed:
----- Method: MessageSet>>selectedMessage (in category 'message list') -----
selectedMessage
"Answer the source method for the currently selected message."
-
self setClassAndSelectorIn: [:class :selector | | source |
class ifNil: [^ 'Class vanished'].
selector first isUppercase ifTrue:
[selector == #Comment ifTrue:
+ ["currentCompiledMethod := class organization commentRemoteStr."
- [currentCompiledMethod := class organization commentRemoteStr.
^ class comment].
selector == #Definition ifTrue:
[^ class definition].
selector == #Hierarchy ifTrue: [^ class printHierarchy]].
source := class sourceMethodAt: selector ifAbsent:
[currentCompiledMethod := nil.
^ 'Missing'].
self showingDecompile ifTrue: [^ self decompiledSourceIntoContents].
currentCompiledMethod := class compiledMethodAt: selector ifAbsent: [nil].
self showingDocumentation ifTrue: [^ self commentContents].
source := self sourceStringPrettifiedAndDiffed.
^ source asText makeSelectorBoldIn: class]!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-kfr.1161.mcz
==================== Summary ====================
Name: Tools-kfr.1161
Author: kfr
Time: 4 June 2022, 8:13:54.520458 pm
UUID: 8880e2ae-b1d5-ad46-8d3b-27d99549220a
Ancestors: Tools-ct.1160
Open a HelpBrowser with TextLink.
Example:
TerseGuideHelp Help
Select text, press Alt+5 (CMD on Mac) and select 'Link to help on class'
(A link of this format: 'My Link<TerseGuideHelp Help>' will hide the part between < & > )
Dependent on Collections-kfr.1011
=============== Diff against Tools-ct.1160 ===============
Item was changed:
----- Method: Model>>addItem: (in category '*Tools') -----
addItem: classAndMethod
"Open a browser directly on the given class and method
Model new addItem: 'Model addItem:'
Model new addItem: 'Model>>addItem:'
"
self flag: #mref. "classAndMethod is a String"
MessageSet
parse: classAndMethod
toClassAndSelector: [ :class :sel |
class ifNil: [^self].
sel = #Comment ifTrue: [^ Browser fullOnClassComment: class].
sel = #Definition ifTrue: [^ Browser newOnClass: class].
sel = #Hierarchy ifTrue: [^ HierarchyBrowser fullOnClass: class].
+ sel = #Help ifTrue: [^HelpBrowser openOn: class].
Browser newOnClass: class selector: sel
]
!