Christoph Thiede uploaded a new version of 60Deprecated to project The Trunk:
http://source.squeak.org/trunk/60Deprecated-ct.102.mcz
==================== Summary ====================
Name: 60Deprecated-ct.102
Author: ct
Time: 10 January 2022, 7:00:18.397518 pm
UUID: b8b23c62-95ac-7749-87bb-aaebee832983
Ancestors: 60Deprecated-mt.101
Complements SUnit-ct.134 (SUnit-ct.133).
=============== Diff against 60Deprecated-mt.101 ===============
Item was added:
+ ----- Method: TestCase>>openDebuggerOnFailingTestMethod (in category '*60Deprecated-running') -----
+ openDebuggerOnFailingTestMethod
+
+ self deprecated: 'ct: Use #debugAsFailure'.
+
+ "SUnit has halted one step in front of the failing test method. Step over the 'self halt' and
+ send into 'self perform: testSelector' to see the failure from the beginning"
+ self
+ halt;
+ performTest!
Item was added:
+ ----- Method: TestCase>>runCaseAsFailure: (in category '*60Deprecated-running') -----
+ runCaseAsFailure: aSemaphore
+
+ self deprecated: 'ct: Use #runCaseWithoutTimeout and #ensure:'.
+ ^ [self runCaseWithoutTimeout]
+ ensure: [aSemaphore signal]!
Christoph Thiede uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ct.1843.mcz
==================== Summary ====================
Name: Morphic-ct.1843
Author: ct
Time: 10 January 2022, 5:29:01.402518 pm
UUID: c969959b-377b-aa41-a85a-b4ffc3239a2d
Ancestors: Morphic-ct.1841
Synchronizes default preference value for "Enclose selection with brackets". Complements Morphic-mt.1812.
=============== Diff against Morphic-ct.1841 ===============
Item was changed:
(PackageInfo named: 'Morphic') postscript: '"Fix missing command key shortcuts such as [cmd]+[+/-] for scale changes."
Project allMorphicProjects do: [:p | p world initializeDesktopCommandKeySelectors].
"New ''scale factor'' menu"
+ TheWorldMainDockingBar updateInstances.
+
+ "Enable ''Enclose selection with brackets'' by default (Morphic-mt.1812)"
+ TextEditor encloseSelection: true.'!
- TheWorldMainDockingBar updateInstances.'!
Christoph Thiede uploaded a new version of Regex-Core to project The Trunk:
http://source.squeak.org/trunk/Regex-Core-ct.76.mcz
==================== Summary ====================
Name: Regex-Core-ct.76
Author: ct
Time: 9 January 2022, 3:50:10.798554 am
UUID: 208ca41a-b09d-854e-b53e-83e0f004f0b4
Ancestors: Regex-Core-mt.61
Eliminates a shadowed variable warning. I have searched the entire package and did not find any other one.
=============== Diff against Regex-Core-mt.61 ===============
Item was changed:
----- Method: RxMatcher>>syntaxBranch: (in category 'double dispatch') -----
syntaxBranch: branchNode
"Double dispatch from the syntax tree.
Branch node is a link in a chain of concatenated pieces.
First build the matcher for the rest of the chain, then make
it for the current piece and hook the rest to it."
| piece branch |
piece := branchNode piece.
branch := branchNode branch ifNil: [ ^piece dispatchTo: self ].
"Optimization: glue a sequence of individual characters into a single string to match."
piece isAtomic ifTrue: [
+ | result next resultStream |
+ resultStream := (String new: 40) writeStream.
+ next := branchNode tryMergingInto: resultStream.
+ result := resultStream contents.
- | result next stream |
- stream := (String new: 40) writeStream.
- next := branchNode tryMergingInto: stream.
- result := stream contents.
result size > 1 ifTrue: [
"worth merging"
^(RxmSubstring new substring: result ignoreCase: ignoreCase)
pointTailTo: (next ifNotNil: [ next dispatchTo: self ]);
yourself ] ].
"No optimization possible or worth it, just concatenate all. "
^(piece dispatchTo: self)
pointTailTo: (branch dispatchTo: self);
yourself!
Christoph Thiede uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-ct.285.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-ct.285
Author: ct
Time: 3 January 2022, 11:54:06.309397 pm
UUID: 6e4aa81c-9483-3a4e-843a-98df1c30189d
Ancestors: ToolBuilder-Morphic-mt.284
Improved multilingual support and recategorizations for the entire package.
=============== Diff against ToolBuilder-Morphic-mt.284 ===============
Item was changed:
----- Method: DirectoryChooserDialog>>userMessage (in category 'ui details') -----
userMessage
"return the string to present to the user in order to explain the purpose of this dialog appearing"
+ ^message ifNil: ['Choose a directory name' translated]!
- ^message ifNil:['Choose a directory name']!
Item was changed:
----- Method: DirectoryChooserDialog>>windowTitle (in category 'ui details') -----
windowTitle
+ ^ 'Choose Directory' translated!
- ^ 'Choose Directory'!
Item was changed:
----- Method: FileAbstractSelectionDialog>>buildButtonsWith: (in category 'toolbuilder') -----
buildButtonsWith: builder
^ {
builder pluggableButtonSpec new
model: self;
label: 'Accept' translated;
color: (self userInterfaceTheme get: #okColor for: #DialogWindow);
action: #acceptFileName.
builder pluggableButtonSpec new
model: self;
+ label: 'Cancel' translated;
- label: 'Cancel';
color: (self userInterfaceTheme get: #cancelColor for: #DialogWindow);
action: #cancelFileChooser}!
Item was changed:
----- Method: FileChooserDialog>>userMessage (in category 'ui details') -----
userMessage
"return the string to present to the user in order to explain the purpose of this dialog appearing"
+ ^message ifNil: ['Choose a file name' translated]!
- ^message ifNil:['Choose a file name']!
Item was changed:
----- Method: FileChooserDialog>>windowTitle (in category 'ui details') -----
windowTitle
"return the window label; would be some application dependent string but I suspect we will want to make the outer morph a dialogue box with no label anyway"
+ ^ 'Choose File' translated!
- ^ 'Choose File'!
Item was changed:
----- Method: FileSaverDialog>>selectFilename: (in category 'filename') -----
selectFilename: aText
"The user has entered a potential filename in the text field. Check it against the current pattern; if it is ok we can accept it and then if it is a file in the current list, highlight it. If it would not match the pattern, alert the user."
fileName := aText asString.
^ self selectExistingFilename
ifTrue:
[ self changed: #fileListIndex.
true ]
ifFalse:
[ suffixList size = 1
ifTrue:
[ | suffix |
((suffix := '.' , suffixList anyOne)
compare: (fileName last: (suffix size min: fileName size))
caseSensitive: FileDirectory default isCaseSensitive) = 2 ifFalse: [ fileName := fileName , suffix ].
true ]
ifFalse:
[ suffixList
at:
(UIManager default
chooseFrom: suffixList
+ title: 'Please choose the type of file to save.' translated)
- title: 'Please choose the type of file to save.')
ifPresent:
[ : choice | fileName := fileName , '.' , choice.
true ]
ifAbsent:
[ suffixList isEmpty or:
+ [ self inform: ('WARNING: File not saved!! A filename matching one of {1} patterns is required.' translated format: {patternList asArray}).
- [ UIManager default inform: 'WARNING: File not saved!! A filename matching one of ' , patternList asArray asString , ' patterns is required.'.
false ] ] ] ]!
Item was changed:
----- Method: FileSaverDialog>>userMessage (in category 'ui details') -----
userMessage
"return the string to present to the user in order to explain the purpose of this dialog appearing"
+ ^message ifNil: ['Choose a file name; you can also edit the name below to create a new file name' translated]!
- ^message ifNil:['Choose a file name; you can also edit the name below to create a new file name']!
Item was changed:
----- Method: FileSaverDialog>>windowTitle (in category 'ui details') -----
windowTitle
"return the window label; would be some application dependent string but I suspect we will want to make the outer morph a dialogue box with no label anyway"
+ ^ 'Save As File' translated!
- ^ 'Save As File'!
Item was changed:
----- Method: ListChooser>>buildWith: (in category 'building') -----
buildWith: builder
| dialogSpec searchBarHeight listSpec fieldSpec |
searchBarHeight := self searchBarHeight.
dialogSpec := builder pluggableDialogSpec new
model: self;
title: #title;
closeAction: #closed;
extent: self initialExtent;
autoCancel: true; "Behave like a pop-up menu. Historical reasons."
children: OrderedCollection new;
buttons: OrderedCollection new;
yourself.
listSpec := builder pluggableListSpec new.
listSpec
model: self;
list: #items;
getIndex: #selectedIndex;
setIndex: #selectedIndex:;
doubleClick: #accept;
"keystrokePreview: #keyStrokeFromList:;"
autoDeselect: false;
filterableList: true;
clearFilterAutomatically: false;
name: #list;
frame: (LayoutFrame fractions: (0@0 corner: 1@1) offsets: (0@searchBarHeight corner: 0@0)).
dialogSpec children add: listSpec.
fieldSpec := builder pluggableInputFieldSpec new.
fieldSpec
model: self;
name: #searchText ;
getText: #searchText;
editText: #searchText:;
setText: #acceptText:;
selection: #textSelection;
menu: nil;
indicateUnacceptedChanges: false;
askBeforeDiscardingEdits: false;
help: (self addAllowed ifTrue: ['Type new or filter existing...' translated] ifFalse: ['Type to filter existing...' translated]);
frame: (LayoutFrame fractions: (0@0 corner: 1@0) offsets: (0@0 corner: 0@searchBarHeight)).
dialogSpec children add: fieldSpec.
"Buttons"
dialogSpec buttons add: (
builder pluggableButtonSpec new
model: self;
label: #acceptLabel;
action: #accept;
enabled: #canAcceptOrAdd;
color: #acceptColor).
dialogSpec buttons add: (
builder pluggableButtonSpec new
model: self;
+ label: 'Cancel' translated;
- label: 'Cancel';
action: #cancel;
color: #cancelColor).
dialogMorph := builder build: dialogSpec.
dialogMorph addKeyboardCaptureFilter: self ; positionOverWidgetNamed: #searchText.
listMorph := builder widgetAt: #list.
listMorph allowEmptyFilterResult: true.
^ dialogMorph!
Item was changed:
----- Method: ListChooser>>title (in category 'accessing') -----
title
+ ^ title ifNil: [ title := 'Please choose' translated ]!
- ^ title ifNil: [ title := 'Please choose' ]!
Item was changed:
----- Method: MorphicUIManager>>chooseFrom:lines:title: (in category 'ui requests') -----
chooseFrom: aList lines: linesArray title: aString
"Choose an item from the given list. Answer the index of the selected item. Cancel value is 0.
There are several (historical) reasons for building a button dialog instead of a list chooser for small lists:
1) Unfortunately, there is existing code that uses this call to create simple confirmation dialogs with a list of #(yes no cancel).
2) Unfortunately, there is existing code that uses this call to mimick a drop-down menu with a (compact) pop-up menu."
self askForProvidedAnswerTo: aString ifSupplied: [:answer |
(answer = #cancel or: [answer isNil]) ifTrue: [^ 0].
^ aList indexOf: answer].
aList ifEmpty: [^ 0].
aList size <= 7 ifTrue: [
| dialog |
dialog := DialogWindow new
+ title: 'Please Choose' translated;
- title: 'Please Choose';
message: aString;
filterEnabled: true;
autoCancel: true; "Like a pop-up menu, click anywhere to dismiss."
yourself.
aList withIndexDo: [:ea :index |
dialog createButton: ea value: index].
dialog selectedButtonIndex: 1.
^ dialog getUserResponseAtHand ifNil: [0]].
^ ListChooser chooseFrom: aList title: aString!
Item was changed:
----- Method: PluggableButtonMorphPlus>>debugAction (in category 'debug menu') -----
debugAction
action ifNil: [^ super debugAction].
(Process
forBlock: [self performAction]
runUntil: [:context | context closure = action])
+ debugWithTitle: ('Debug button action "{1}" in model "{2}"' translated format: {self label. self target printString}).!
- debugWithTitle: ('Debug button action "{1}" in model "{2}"' format: {self label. self target printString}).!
Item was changed:
+ ----- Method: PluggableCheckBoxMorph class>>on:getState:action:label: (in category 'instance creation') -----
- ----- Method: PluggableCheckBoxMorph class>>on:getState:action:label: (in category 'as yet unclassified') -----
on: anObject getState: getStateSel action: actionSel label: labelSel
^ self new
on: anObject
getState: getStateSel
action: actionSel
label: labelSel
menu: nil
!
Item was changed:
+ ----- Method: PluggableTreeItemNode>>refresh (in category 'private') -----
- ----- Method: PluggableTreeItemNode>>refresh (in category 'as yet unclassified') -----
refresh
self parent ifNil: [^ self].
self setItem: (self parent contents
at: self index
ifAbsent: [self error: 'No support for changed child count yet!!'])
item.!