Marcel Taeumel uploaded a new version of Files to project The Trunk:
http://source.squeak.org/trunk/Files-mt.205.mcz
==================== Summary ====================
Name: Files-mt.205
Author: mt
Time: 31 August 2023, 2:45:15.602117 pm
UUID: f266e8ba-65e3-6c43-9f32-cb92acce32ab
Ancestors: Files-mt.204
Adds commentary for path-lookup edge case on Windows platform.
For the changed win32 platform code, see OSVM commit 330d6779ad2ecbce1f07131f53d75cd168165f0b
Complements VMMaker.oscog-mt.3336 (only commentary)
=============== Diff against Files-mt.204 ===============
Item was changed:
FileDirectory subclass: #DosFileDirectory
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Files-Directories'!
+ !DosFileDirectory commentStamp: 'ct 8/17/2023 13:25' prior: 0!
+ I represent a DOS or Windows FileDirectory. Paths follow the usual syntax for Microsoft Windows, including a length limit to 260 characters. Above these limit, the VM falls back to UNC paths, which however do not support syntactic sugar in paths such as '.', '..', or forward slashes instead of backward slashes. See examples in my primitive methods. Thus, any primitive call for a possibly long path should not contain such syntactic sugar. Perspectively, this class should wipe out all this sugar during construction (normalization).!
- !DosFileDirectory commentStamp: '<historical>' prior: 0!
- I represent a DOS or Windows FileDirectory.
- !
Item was changed:
----- Method: FileDirectory>>primLookupEntryIn:index: (in category 'private') -----
primLookupEntryIn: fullPath index: index
"Look up the index-th entry of the directory with the given fully-qualified path (i.e., starting from the root of the file hierarchy) and return an array containing:
<name> <creationTime> <modificationTime> <dirFlag> <fileSize>
The empty string enumerates the top-level files or drives. (For example, on Unix, the empty path enumerates the contents of '/'. On Macs and PCs, it enumerates the mounted volumes/drives.)
+ Note that in general, fullPath must not contain syntactic sugar for the current platform (e.g., '.' or '..', or on Windows, forward slashes instead of backslashes). These conventions are only fully supported on Unix platforms; on Windows, they are only supported for short non-UNC file paths containing max 260 characters:
+ DON'T: self primLookupEntryIn: '<very long path>\foo\.' index: ...
+ DON'T: self primLookupEntryIn: '<very long path>\foo\..' index: ...
+ DON'T (on Windows): self primLookupEntryIn: '<very long path>\foo/bar' index: ...
+ See the comment in the primitive implementation for more details.
The creation and modification times are in seconds since the start of the Smalltalk time epoch. DirFlag is true if the entry is a directory. FileSize the file size in bytes or zero for directories. The primitive returns nil when index is past the end of the directory. It fails if the given path is bad."
<primitive: 'primitiveDirectoryLookup' module: 'FilePlugin'>
^ #badDirectoryPath
!
Item was changed:
----- Method: FileDirectory>>primLookupEntryIn:name: (in category 'private') -----
primLookupEntryIn: fullPath name: fName
-
"Look up <fName> (a simple file name) in the directory identified by <fullPath>
and return an array containing:
<fName> <creationTime> <modificationTime> <dirFlag> <fileSize>
On Unix, the empty path denotes '/'.
On Macs and PCs, it is the container of the system volumes.)
+ Note that in general, neither fullPath nor fName must contain syntactic sugar for the current platform (e.g., '.' or '..', or on Windows, forward slashes instead of backslashes). These conventions are only fully supported on Unix platforms; on Windows, they are only supported for short non-UNC file paths containing max 260 characters (for the full path concatenated from the directory path, a backslash, and the file name). As a single (!!) exception, the file name may always be a single dot ('.'), which is supported for an efficient existence test of the directory path (e.g., FileDirectory>>#exists):
+ DON'T: self primLookupEntryIn: '<very long path>' name: 'plonk\.'.
+ DON'T: self primLookupEntryIn: '<very long path>' name: 'plonk\..'.
+ DON'T (on Windows): self primLookupEntryIn: '<very long path>' name: 'foo/bar'.
+ DO: self primLookupEntryIn: '<very long path>' name: '.'.
+ See the comment in the primitive implementation for more details.
The creation and modification times are in seconds since the start of the Smalltalk time epoch. DirFlag is true if the entry is a directory. FileSize the file size in bytes or zero for directories. The primitive returns nil when index is past the end of the directory. It fails if the given path is bad."
<primitive: 'primitiveDirectoryEntry' module: 'FilePlugin'>
^ #primFailed "to distinguish from nil"
!
Marcel Taeumel uploaded a new version of Monticello to project The Trunk:
http://source.squeak.org/trunk/Monticello-mt.797.mcz
==================== Summary ====================
Name: Monticello-mt.797
Author: mt
Time: 31 August 2023, 10:54:27.756282 am
UUID: de7b05b8-0ddc-d34f-bcfe-f87603cfd331
Ancestors: Monticello-ct.796
Use #px for magic (pixel-based) numbers. Complements Graphics-mt.544
=============== Diff against Monticello-ct.796 ===============
Item was changed:
----- Method: MCSnapshotBrowser>>defaultButtonRowSpacing (in category 'morphic ui') -----
defaultButtonRowSpacing
"Overwritten to make our class switches buttons look like the ones in the regular system browser."
+ ^ -1 px!
- ^ (-1 "px" * RealEstateAgent scaleFactor) truncated!
Marcel Taeumel uploaded a new version of Graphics to project The Trunk:
http://source.squeak.org/trunk/Graphics-mt.544.mcz
==================== Summary ====================
Name: Graphics-mt.544
Author: mt
Time: 31 August 2023, 10:52:58.559282 am
UUID: b70909d7-fda1-c44f-9ef1-97c666c840fc
Ancestors: Graphics-mt.543
Speed up and extend #px to be conveniently used for #scaleFactor support of magic (pixel-based) numbers.
=============== Diff against Graphics-mt.543 ===============
Item was changed:
----- Method: Number>>px (in category '*Graphics-scale factor') -----
px
"Convert the receiver representing raw pixels at 100% (96ppi) to the current scale factor. Note that you currently have to do this manually for all graphics-related properties and layout-specific measures such as #borderWidth: and #layoutInset:. Only for model windows (see #initialExtent) that are no dialogs, that scaling will happen automatically in ToolBuilder."
+ | scaleFactor |
+ self = 0 ifTrue: [^ self].
+ (scaleFactor := RealEstateAgent scaleFactor) = 1 ifTrue: [^ self].
+ ^ self > 4
+ ifTrue: [(scaleFactor * self) rounded]
+ ifFalse: [(scaleFactor * self) truncated]
+
+ "For self > 4, we recommend #rounded instead of #truncated. For smaller values, however, rounding makes no sense because we have no sub-pixel access and things would look too big too soon. Also, #scaleFactor might be a float and self is usually an integer. Thus, self should be on the right side of the multiplication to speed up the whole thing."!
- self flag: #discuss. "mt: For self > 4, I would recommend #rounded instead of #truncated. For smaller values, however, rounding makes no sense because we have no sub-pixel access and things would look too big too soon."
- ^ (self * RealEstateAgent scaleFactor) truncated!
Marcel Taeumel uploaded a new version of MorphicExtras to project The Trunk:
http://source.squeak.org/trunk/MorphicExtras-mt.348.mcz
==================== Summary ====================
Name: MorphicExtras-mt.348
Author: mt
Time: 31 August 2023, 9:39:52.504282 am
UUID: c218995a-52c2-9540-8072-af212cb61d6f
Ancestors: MorphicExtras-pre.347
Fix typo.
=============== Diff against MorphicExtras-pre.347 ===============
Item was changed:
----- Method: TransformMorph>>quickAddAllMorphs: (in category '*MorphicExtras-accessing') -----
quickAddAllMorphs: aCollection
"A fast add of all the morphs for the PluggableListMorph>>list: method to use -- assumes that fullBounds will get called later by the sender, so it avoids doing any updating on the morphs in aCol or updating layout of this scroller. So the sender should handle those tasks as appropriate"
| myWorld |
+ self flag: #deprecated.
myWorld := self world.
aCollection do: [:m | | itsWorld |
m owner ifNotNil: [
itsWorld := m world.
itsWorld == myWorld ifFalse: [m outOfWorld: itsWorld].
+ m owner privateRemove: m].
- m owner privateRemoveMorph: m].
m privateOwner: self.
"inWorld ifTrue: [self addedOrRemovedSubmorph: m]."
itsWorld == myWorld ifFalse: [m intoWorld: myWorld].
].
submorphs := aCollection.
"self layoutChanged."
!