Eliot Miranda uploaded a new version of CollectionsTests to project The Trunk:
http://source.squeak.org/trunk/CollectionsTests-eem.287.mcz
==================== Summary ====================
Name: CollectionsTests-eem.287
Author: eem
Time: 22 December 2017, 2:14:32.454096 am
UUID: 4ae7ecb8-a1b6-474b-a90a-b35d04536b8a
Ancestors: CollectionsTests-eem.286
Fix ByteArrayTest>>testFallbackReplaceFromToWith
=============== Diff against CollectionsTests-eem.286 ===============
Item was changed:
----- Method: ByteArrayTest>>testFallbackReplaceFromToWith (in category 'testing') -----
testFallbackReplaceFromToWith
| teststring ba sz cm |
+ teststring := 'Test string' asByteArray.
+ sz := teststring byteSize.
- teststring := 'Test string'.
- sz := 'Test string' byteSize.
ba := ByteArray new: sz.
cm := SequenceableCollection compiledMethodAt: #replaceFrom:to:with:startingAt:.
self shouldnt: [cm valueWithReceiver: ba arguments: {1. sz. teststring. 1}]
raise: Exception
description: 'Primitive 105 should be optional for ByteArray'
!
tim Rowledge uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-tpr.991.mcz
==================== Summary ====================
Name: System-tpr.991
Author: tpr
Time: 21 December 2017, 12:28:58.277846 pm
UUID: 9d4fc5f3-acd3-4406-a00e-7e61a91b62bc
Ancestors: System-mt.990
vm/image name related clean ups
=============== Diff against System-mt.990 ===============
Item was changed:
----- Method: FileDirectory class>>setDefaultDirectory: (in category '*System-Files') -----
setDefaultDirectory: directoryName
"Initialize the default directory to the directory supplied. This method is called when the image starts up."
| dirName |
DirectoryClass := self activeDirectoryClass.
+ "There doesn't seem to be any really good reason to use the FilePath conversion stuff here; after all, this method gets sent after having read the image path and explicitly converting it"
dirName := (FilePath pathName: directoryName) asSqueakPathName.
[dirName endsWith: self slash] whileTrue:[
dirName := dirName copyFrom: 1 to: dirName size - self slash size.
].
DefaultDirectory := self on: dirName.!
Item was changed:
----- Method: SecurityManager>>secureUserDirectory (in category 'accessing') -----
secureUserDirectory
"SecurityManager default secureUserDirectory"
| dir |
dir := self primSecureUserDirectory.
^ dir
ifNil: [FileDirectory default pathName]
+ ifNotNil: [dir vmPathToSqueakPath]!
- ifNotNil: [(FilePath pathName: dir isEncoded: true) asSqueakPathName]!
Item was changed:
----- Method: SecurityManager>>untrustedUserDirectory (in category 'accessing') -----
untrustedUserDirectory
"SecurityManager default untrustedUserDirectory"
| dir |
dir := self primUntrustedUserDirectory.
^ dir
ifNil: [FileDirectory default pathName]
+ ifNotNil: [dir vmPathToSqueakPath]!
- ifNotNil: [(FilePath pathName: dir isEncoded: true) asSqueakPathName]!
Item was changed:
----- Method: SmalltalkImage>>imageName (in category 'image, changes names') -----
imageName
"Answer the full path name for the current image."
"Smalltalk imageName"
+ ^ self primImageName vmPathToSqueakPath
- | str |
- str := self primImageName.
- ^ (FilePath pathName: str isEncoded: true) asSqueakPathName.
!
Item was changed:
----- Method: SmalltalkImage>>imageName: (in category 'image, changes names') -----
imageName: newName
"Set the the full path name for the current image. All further snapshots will use this."
+ self primImageName: newName asVmPathName.
- | encoded |
- encoded := (FilePath pathName: newName isEncoded: false) asVmPathName.
- self primImageName: encoded.
!
Item was changed:
----- Method: SmalltalkImage>>vmFileName (in category 'command line') -----
vmFileName
"Answer the absolute file name of the the Smalltalk virtual machine"
"Smalltalk vmFileName"
+ ^ self primVmFileName vmPathToSqueakPath
- ^ (FilePath pathName: (self primVmFileName) isEncoded: true) asSqueakPathName.
!
Item was changed:
----- Method: SmalltalkImage>>vmPath (in category 'command line') -----
vmPath
+ "Answer the path for the directory containing the Smalltalk virtual machine, making sure to convert the vm string to a Squeak string as required."
- "Answer the path for the directory containing the Smalltalk virtual machine. Return the empty string if this primitive is not implemented."
"Smalltalk vmPath"
+ ^self primVmPath vmPathToSqueakPath
- ^ (FilePath pathName: (self primVmPath) isEncoded: true) asSqueakPathName.
!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1383.mcz
==================== Summary ====================
Name: Morphic-mt.1383
Author: mt
Time: 21 December 2017, 9:28:24.688535 pm
UUID: fb18b808-6654-884a-a1cf-d00df8f2755d
Ancestors: Morphic-mt.1382
Fixes a rare bug in text selections. NewParagraph >> #selectionRectsFrom:to: did not honor the contract as of NewParagraph >> #lineIndexOfCharacterIndex:, which is never use a line index < 1.
=============== Diff against Morphic-mt.1382 ===============
Item was changed:
----- Method: NewParagraph>>selectionRectsFrom:to: (in category 'selection') -----
selectionRectsFrom: characterBlock1 to: characterBlock2
"Return an array of rectangles representing the area between the two character blocks given as arguments."
| line1 line2 rects cb1 cb2 w |
characterBlock1 <= characterBlock2
ifTrue: [cb1 := characterBlock1. cb2 := characterBlock2]
ifFalse: [cb2 := characterBlock1. cb1 := characterBlock2].
cb1 = cb2 ifTrue:
[w := self caretWidth.
^ Array with: (cb1 topLeft - (w@0) corner: cb1 bottomLeft + ((w+1)@0))].
line1 := self lineIndexOfCharacterIndex: cb1 stringIndex.
line2 := self lineIndexOfCharacterIndex: cb2 stringIndex.
cb1 top = (lines at: line1) top
ifFalse:
["a word did not fit on prev line - start selection on prev line"
+ line1 := line1 - 1 max: 1].
- line1 := line1 - 1].
line1 = line2 ifTrue:
[^ Array with: (cb1 topLeft corner: cb2 bottomRight)].
rects := OrderedCollection new.
rects addLast: (cb1 topLeft corner: (lines at: line1) bottomRight).
line1+1 to: line2-1 do: [ :i |
| line |
line := lines at: i.
(line left = rects last left and: [ line right = rects last right ])
ifTrue: [ "new line has same margins as old one -- merge them, so that the caller gets as few rectangles as possible"
| lastRect |
lastRect := rects removeLast.
rects add: (lastRect bottom: line bottom) ]
ifFalse: [ "differing margins; cannot merge"
rects add: line rectangle ] ].
rects addLast: ((lines at: line2) topLeft corner: cb2 bottomLeft).
^ rects!
tim Rowledge uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-tpr.51.mcz
==================== Summary ====================
Name: ToolBuilder-MVC-tpr.51
Author: tpr
Time: 21 December 2017, 12:16:12.950398 pm
UUID: 88429193-fa3e-40d3-ab97-76a522fa74e6
Ancestors: ToolBuilder-MVC-tpr.50
delete obsolete version
=============== Diff against ToolBuilder-MVC-tpr.50 ===============
Item was removed:
- ----- Method: MVCUIManager>>filenameSaverRequest:initialAnswer: (in category 'ui requests') -----
- filenameSaverRequest: queryString initialAnswer: defaultAnswer
- "Open a FileSaverDialog to ask for a place and filename to use for saving a file. The initial suggestion for the filename is defaultAnswer but the user may choose any existing file or type in a new name entirely"
- "Note that this is a trulyawful message name but I can't think of a better one right now"
- "MVC has to stick with the boring way of doing it"
- ^self request: queryString initialAnswer: defaultAnswer
- !
tim Rowledge uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-tpr.781.mcz
==================== Summary ====================
Name: Tools-tpr.781
Author: tpr
Time: 21 December 2017, 12:12:06.862491 pm
UUID: aff0d926-0733-4bdb-b10a-cd95a4ca7ee9
Ancestors: Tools-tpr.780
Class comment fr DirectoryChooser, couple of improvements
=============== Diff against Tools-tpr.780 ===============
Item was changed:
FileAbstractSelectionDialog subclass: #DirectoryChooserDialog
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'Tools-FileDialogs'!
+
+ !DirectoryChooserDialog commentStamp: 'tpr 12/21/2017 11:32' prior: 0!
+ A DirectoryChooserDialog is a modal dialog to allow choosing a directory. The full directory name is returned, or nil if no selection was made.
+
+ Normal usage would be
+ myDirname := DirectoryChooserDialog openOn: myApplicationDefaultDirectory label: 'Choose the directory to use'
+ !
Item was added:
+ ----- Method: DirectoryChooserDialog class>>openOn:label: (in category 'instance creation') -----
+ openOn: aDirectory label: labelString
+ "open a directory chooser starting with aDirectory"
+
+ ^DirectoryChooserDialog new
+ directory: aDirectory;
+ message: labelString;
+ getUserResponse!
Item was added:
+ ----- Method: DirectoryChooserDialog>>initialExtent (in category 'toolbuilder') -----
+ initialExtent
+ "Since this is a single list it can be a bit narrower than a FileChooserDialog"
+
+ ^300@400!
Item was added:
+ ----- Method: FileChooserDialog class>>openOnPattern:label: (in category 'instance creation') -----
+ openOnPattern: patternList label: messageString
+ "open a modal dialog to choose a file. Start the dialog with aDirectory selected and files matching the default 'everything' pattern"
+
+ ^self new
+ pattern: patternList;
+ message: messageString;
+ getUserResponse!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1382.mcz
==================== Summary ====================
Name: Morphic-mt.1382
Author: mt
Time: 21 December 2017, 9:59:30.675674 am
UUID: 0c6a96d1-6bac-9848-bfa1-faced8611cb6
Ancestors: Morphic-mt.1381
Small fix considering text selection after text-drag cancel.
Try a different offset for drag-transfer morphs. Let's see if we can point the dragged morphs more easily now.
=============== Diff against Morphic-mt.1381 ===============
Item was changed:
----- Method: TextMorph>>startDrag: (in category 'event handling') -----
startDrag: evt
+ self removeProperty: #waitingForTextDrag.
+
[evt hand grabMorph: (TransferMorph withPassenger: self selection from: self)]
ensure: [evt hand releaseMouseFocus: self].!
Item was changed:
----- Method: TextMorphForEditView>>acceptDroppingMorph:event: (in category 'dropping/grabbing') -----
acceptDroppingMorph: aTransferMorph event: evt
"Accept a text to be inserted at the event/cursor position. Either remove or keep the source text depending on the transfer morph's copy state."
- self removeProperty: #waitingForTextDrag.
-
self
handleInteraction: [
aTransferMorph shouldCopy
ifFalse: [(aTransferMorph source respondsTo: #editor)
ifTrue: [aTransferMorph source editor destructiveBackWord]].
self editor addText: aTransferMorph passenger asText event: evt]
fromEvent: evt.
evt hand newKeyboardFocus: self.!
Item was changed:
----- Method: TransferMorph>>aboutToBeGrabbedBy: (in category 'dropping/grabbing') -----
aboutToBeGrabbedBy: aHand
"The receiver is being grabbed by a hand.
Perform necessary adjustments (if any) and return the actual morph
that should be added to the hand."
"Since this morph has been initialized automatically with bounds origin
0@0, we have to move it to aHand position."
super aboutToBeGrabbedBy: aHand.
+ self align: self fullBounds topLeft with: aHand position + (aHand extent // 3).
- self align: self fullBounds bottomLeft with: aHand position.
aHand newKeyboardFocus: self.!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.1380.mcz
==================== Summary ====================
Name: Morphic-mt.1380
Author: mt
Time: 21 December 2017, 9:05:08.079231 am
UUID: a78fcc1d-dbf1-0c49-a445-df9f4834bbaf
Ancestors: Morphic-mt.1379
Removes the hack used for text dropping. Not necessary anymore due to the latest fix in PluggableTextMorphPlus.
=============== Diff against Morphic-mt.1379 ===============
Item was changed:
----- Method: TextMorphForEditView>>acceptDroppingMorph:event: (in category 'dropping/grabbing') -----
acceptDroppingMorph: aTransferMorph event: evt
"Accept a text to be inserted at the event/cursor position. Either remove or keep the source text depending on the transfer morph's copy state."
self removeProperty: #waitingForTextDrag.
self
handleInteraction: [
aTransferMorph shouldCopy
ifFalse: [(aTransferMorph source respondsTo: #editor)
ifTrue: [aTransferMorph source editor destructiveBackWord]].
self editor addText: aTransferMorph passenger asText event: evt]
fromEvent: evt.
+
+ evt hand newKeyboardFocus: self.!
-
- self flag: #hack. "mt: Shout background styling restores the selection, which interferes here. *sigh*"
- self editView instVarNamed: #selectionInterval put: nil.
- (aTransferMorph source respondsTo: #editView)
- ifTrue: [aTransferMorph source editView instVarNamed: #selectionInterval put: nil.]!