Eliot Miranda uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-eem.1152.mcz
==================== Summary ====================
Name: System-eem.1152
Author: eem
Time: 15 April 2020, 4:11:22.143513 pm
UUID: 3e0d01fb-556b-4a58-926d-417c7b193a4e
Ancestors: System-mt.1151
Change some SystemNavigation methods to use selectorsDo:; messagesDo: should be deprecated at some point.
=============== Diff against System-mt.1151 ===============
Item was changed:
----- Method: SystemNavigation>>allUnimplementedCalls (in category 'query') -----
allUnimplementedCalls
"Answer a collection of each message that is sent by an expression in a method but is not implemented by any object in the system."
| result implementedMessages |
implementedMessages := self allImplementedMessages.
result := OrderedCollection new.
self allSelectorsAndMethodsDo: [ :behavior :selector :method |
+ method selectorsDo: [ :each |
- method messagesDo: [ :each |
(implementedMessages includes: each) ifFalse: [
result add: (String streamContents: [ :stream |
stream
nextPutAll: behavior name;
space;
nextPutAll: selector;
space;
nextPutAll: 'calls: ';
nextPutAll: each ]) ] ] ].
^result!
Item was changed:
----- Method: SystemNavigation>>allUnimplementedNonPrimitiveCalls (in category 'query') -----
allUnimplementedNonPrimitiveCalls
"Answer an collection of each message that is sent by an expression in a method but is not implemented by any object in the system. This list won't include primitive methods."
| result implementedMessages |
implementedMessages := self allImplementedMessages.
result := OrderedCollection new.
self allSelectorsAndMethodsDo: [ :behavior :selector :method |
method primitive = 0 ifTrue: [
+ method selectorsDo: [ :each |
- method messagesDo: [ :each |
(implementedMessages includes: each) ifFalse: [
result add: (String streamContents: [ :stream |
stream
nextPutAll: behavior name;
space;
nextPutAll: selector;
space;
nextPutAll: 'calls: ';
nextPutAll: each ]) ] ] ] ].
^result!
Item was changed:
----- Method: SystemNavigation>>unimplemented (in category 'query') -----
unimplemented
"Answer an collection of each message that is sent by an expression in a method but is not implemented by any object in the system."
| implemented unimplemented |
implemented := self allImplementedMessages.
unimplemented := IdentityDictionary new.
self allSelectorsAndMethodsDo: [ :behavior :selector :method |
+ method selectorsDo: [ :each |
- method messagesDo: [ :each |
| entry |
(implemented includes: each) ifFalse: [
entry := unimplemented
at: each
ifPresent: [ :oldEntry |
oldEntry copyWith: behavior name, '>', selector ]
ifAbsent: [
{ behavior name, '>', selector } ].
unimplemented at: each put: entry ] ] ].
^unimplemented!
Eliot Miranda uploaded a new version of Kernel to project The Trunk:
http://source.squeak.org/trunk/Kernel-eem.1321.mcz
==================== Summary ====================
Name: Kernel-eem.1321
Author: eem
Time: 15 April 2020, 4:07:36.59453 pm
UUID: 93f4b4c9-41ba-47f8-b220-72087fc41176
Ancestors: Kernel-eem.1319
Change a couple of CompiledCode methods to use selectorsDo:; messagesDo: should be deprecated at some point.
=============== Diff against Kernel-eem.1319 ===============
Item was changed:
----- Method: CompiledCode>>messages (in category 'scanning') -----
messages
"Answer a Set of all the message selectors sent by this method."
| result |
result := Set new.
+ self selectorsDo: [:selector | result add: selector].
- self messagesDo: [:selector | result add: selector].
^ result!
Item was changed:
----- Method: CompiledCode>>messagesSequence (in category 'scanning') -----
messagesSequence
"Answer a sequence of all the message selectors sent by this method in the order they are sent. Unlike #messages this may include duplicates. Note that both the sources and the decompiled sources might suggest different results. The returned information reflect the actual bytecode."
^ Array streamContents: [:result |
+ self selectorsDo: [:selector | result nextPut: selector]]!
- self messagesDo: [:selector | result nextPut: selector]]!
Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.958.mcz
==================== Summary ====================
Name: Tools-mt.958
Author: mt
Time: 15 April 2020, 5:55:35.334699 pm
UUID: 8d488e07-f7e5-5a47-9861-a23cb62b6871
Ancestors: Tools-mt.957
For MVC projects, fixes high CPU load during menu invocation.
Note that #controlActivity is only used when PopUpMenu is invoked from within an MVC project. Yes, we should clean up this part in the future.
Complements ST80-mt.251.
=============== Diff against Tools-mt.957 ===============
Item was changed:
----- Method: PopUpMenu>>controlActivity (in category 'basic control sequence') -----
controlActivity
"Do whatever a menu must do - now with keyboard support."
| didNotMove downPos |
didNotMove := true.
Sensor anyButtonPressed
ifFalse:
[didNotMove := false.
Sensor waitButtonOrKeyboard].
+
-
Sensor keyboardPressed ifFalse: [self manageMarker].
(didNotMove and: [selection = 0])
ifTrue:
[downPos := Sensor cursorPoint.
[didNotMove and: [Sensor anyButtonPressed]]
whileTrue:
+ [ Project current world activeController interActivityPause.
+ (downPos dist: Sensor cursorPoint) < 2 ifFalse: [didNotMove := false]].
- [(downPos dist: Sensor cursorPoint) < 2 ifFalse: [didNotMove := false]].
didNotMove ifTrue: [Sensor waitButtonOrKeyboard]].
[Sensor keyboardPressed] whileTrue:
[self readKeyboard ifTrue: [^ self].
Sensor waitButtonOrKeyboard].
+ [Sensor anyButtonPressed] whileTrue: [
+ ScheduledControllers activeController interActivityPause.
+ self manageMarker]!
- [Sensor anyButtonPressed] whileTrue: [self manageMarker]!
Marcel Taeumel uploaded a new version of ST80 to project The Trunk:
http://source.squeak.org/trunk/ST80-mt.251.mcz
==================== Summary ====================
Name: ST80-mt.251
Author: mt
Time: 15 April 2020, 5:53:42.145699 pm
UUID: 07f97eb2-f0c8-df4c-9f7b-fa6225418264
Ancestors: ST80-mt.250
For MVC projects, fixes high CPU load during empty world and while scrolling lists.
=============== Diff against ST80-mt.250 ===============
Item was changed:
----- Method: Controller>>controlLoop (in category 'basic control sequence') -----
controlLoop
"Sent by Controller|startUp as part of the standard control sequence.
Controller|controlLoop sends the message Controller|isControlActive to test
for loop termination. As long as true is returned, the loop continues.
When false is returned, the loop ends. Each time through the loop, the
message Controller|controlActivity is sent."
+ [self interActivityPause. self isControlActive] whileTrue: [
+ self controlActivity. Processor yield]!
- [self isControlActive] whileTrue: [
- self interActivityPause. self controlActivity. Processor yield]!
Item was changed:
----- Method: ScrollController>>scrollAbsolute (in category 'private') -----
scrollAbsolute
| markerOutline oldY markerForm |
self changeCursor: Cursor rightArrow.
oldY := -1.
sensor anyButtonPressed ifTrue:
[markerOutline := marker deepCopy.
markerForm := Form fromDisplay: marker.
Display fill: marker fillColor: scrollBar insideColor.
Display border: markerOutline width: 1 fillColor: Color gray.
markerForm
follow:
[oldY ~= sensor cursorPoint y
ifTrue:
[oldY := sensor cursorPoint y.
marker := marker translateBy:
0 @ ((oldY - marker center y
min: scrollBar inside bottom - marker bottom)
max: scrollBar inside top - marker top).
self scrollView].
marker origin]
+ while: [
+ self interActivityPause.
+ sensor anyButtonPressed].
- while: [sensor anyButtonPressed].
Display fill: markerOutline fillColor: scrollBar insideColor.
self moveMarker]!
Marcel Taeumel uploaded a new version of ToolBuilder-MVC to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-MVC-mt.59.mcz
==================== Summary ====================
Name: ToolBuilder-MVC-mt.59
Author: mt
Time: 15 April 2020, 3:56:47.074534 pm
UUID: 3523b197-7793-cc40-baef-9cf2518ced06
Ancestors: ToolBuilder-MVC-mt.58
Complements ToolBuilder-Kernel-mt.138
=============== Diff against ToolBuilder-MVC-mt.58 ===============
Item was added:
+ ----- Method: MVCUIManager>>request:initialAnswer:onCancelReturn: (in category 'ui requests') -----
+ request: queryString initialAnswer: defaultAnswer onCancelReturn: cancelResponse
+ "Create an instance of me whose question is queryString with the given initial answer. Answer the string the user accepts. Answer cancelResponse if the user cancels."
+
+ self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
+ ^ answer = #default
+ ifTrue: [defaultAnswer]
+ ifFalse: [answer]].
+
+ ^ FillInTheBlank
+ request: queryString
+ initialAnswer: defaultAnswer
+ onCancelReturn: cancelResponse!
Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.257.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.257
Author: mt
Time: 15 April 2020, 3:56:21.096534 pm
UUID: d24dd086-2194-9444-bff3-29bc71ae3e5a
Ancestors: ToolBuilder-Morphic-mt.256
Complements ToolBuilder-Kernel-mt.138.
=============== Diff against ToolBuilder-Morphic-mt.256 ===============
Item was added:
+ ----- Method: MorphicUIManager>>request:initialAnswer:onCancelReturn: (in category 'ui requests') -----
+ request: queryString initialAnswer: defaultAnswer onCancelReturn: cancelResponse
+ "Create an instance of me whose question is queryString with the given initial answer. Answer the string the user accepts. Answer cancelResponse if the user cancels."
+
+ self askForProvidedAnswerTo: queryString ifSupplied: [:answer |
+ ^ answer = #default
+ ifTrue: [defaultAnswer]
+ ifFalse: [answer]].
+
+ ^ FillInTheBlankMorph
+ request: queryString
+ initialAnswer: defaultAnswer
+ onCancelReturn: cancelResponse!
Marcel Taeumel uploaded a new version of ToolBuilder-Kernel to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Kernel-mt.138.mcz
==================== Summary ====================
Name: ToolBuilder-Kernel-mt.138
Author: mt
Time: 15 April 2020, 3:55:51.006534 pm
UUID: 8d0776ff-7711-a74c-ba35-ec3420f47184
Ancestors: ToolBuilder-Kernel-mt.137
For text requests, fall back to the most simple case so that ui managers do not have to implement all cases. For example, our DummyUIManager did forget one already and nobody noticed.
Adds hook to specify the cancel answer so that applications can actually work with cancellation just like in the confirmation dialogs.
I suspect that it is not possible to return "nil" by default because there are many cases that rely on a string being return in any case.
=============== Diff against ToolBuilder-Kernel-mt.137 ===============
Item was changed:
----- Method: UIManager>>request:initialAnswer: (in category 'ui requests - text') -----
request: queryString initialAnswer: defaultAnswer
+ "Create an instance of me whose question is queryString with the given initial answer. Answer the string the user accepts. Answer the empty string if the user cancels."
+
+ ^ self subclassResponsibility!
- "Create an instance of me whose question is queryString with the given
- initial answer. Invoke it centered at the given point, and answer the
- string the user accepts. Answer the empty string if the user cancels."
- ^self subclassResponsibility!
Item was changed:
----- Method: UIManager>>request:initialAnswer:centerAt: (in category 'ui requests - text') -----
request: queryString initialAnswer: defaultAnswer centerAt: aPoint
+ "Create an instance of me whose question is queryString with the given initial answer. Invoke it centered at the given point, and answer the string the user accepts. Answer the empty string if the user cancels."
- "Create an instance of me whose question is queryString with the given
- initial answer. Invoke it centered at the given point, and answer the
- string the user accepts. Answer the empty string if the user cancels."
+ ^ self request: queryString initialAnswer: defaultAnswer!
- ^self subclassResponsibility!
Item was added:
+ ----- Method: UIManager>>request:initialAnswer:onCancelReturn: (in category 'ui requests - text') -----
+ request: queryString initialAnswer: defaultAnswer onCancelReturn: cancelResponse
+ "Create an instance of me whose question is queryString with the given initial answer. Answer the string the user accepts. Answer cancelResponse if the user cancels."
+
+ ^ self request: queryString initialAnswer: defaultAnswer!