Marcel Taeumel uploaded a new version of ToolBuilder-Morphic to project The Trunk:
http://source.squeak.org/trunk/ToolBuilder-Morphic-mt.351.mcz
==================== Summary ====================
Name: ToolBuilder-Morphic-mt.351
Author: mt
Time: 27 May 2024, 9:35:50.131589 am
UUID: 0b75d4ca-c9a4-c14c-8f41-95b7efed6507
Ancestors: ToolBuilder-Morphic-ct.350
Improves commentary for #debugAction.
=============== Diff against ToolBuilder-Morphic-ct.350 ===============
Item was changed:
----- Method: PluggableButtonMorphPlus>>debugAction (in category 'debug menu') -----
debugAction
+ "Evaluate the receiver's action until we see a client-specific context on the stack, ignoring intermediate glue code. Note that we first compare against #closure (or #receiver) because it is much faster than a context's #selector. This optimization is useful since such simulated execution (here: #forBlock:runUntil:) is already very slow."
action ifNil: [^ super debugAction].
(Process
forBlock: [self performAction]
runUntil: [:context | context closure == action or: [action isMessageSend and: [context selector == action selector]]])
debugWithTitle: ('Debug button action "{1}" in model "{2}"' translated format: {self label. self target printString}).!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2161.mcz
==================== Summary ====================
Name: Morphic-mt.2161
Author: mt
Time: 27 May 2024, 9:35:09.346589 am
UUID: 2c52246c-f060-414a-968b-b590d4f0f404
Ancestors: Morphic-ct.2160
Improves commentary for #debugAction.
=============== Diff against Morphic-ct.2160 ===============
Item was changed:
----- Method: MenuItemMorph>>debugAction (in category 'browse') -----
debugAction
+ "Evaluate the receiver's action until we see a client-specific context on the stack, ignoring intermediate glue code. Note that we first compare against #closure (or #receiver) because it is much faster than a context's #selector. This optimization is useful since such simulated execution (here: #forBlock:runUntil:) is already very slow."
+
-
(Process
forBlock: [self doButtonAction]
runUntil: [:context | context closure == self effectiveActionTarget or: [context receiver == self effectiveActionTarget and: [context selector == self effectiveActionSelector]]])
debugWithTitle: ('Debug menu action "{1}" in model "{2}"' translated format: {self contents. self target printString}).!
Item was changed:
----- Method: PluggableButtonMorph>>debugAction (in category 'debug menu') -----
debugAction
+ "Evaluate the receiver's action until we see a client-specific context on the stack, ignoring intermediate glue code. Note that we first compare against #closure (or #receiver) because it is much faster than a context's #selector. This optimization is useful since such simulated execution (here: #forBlock:runUntil:) is already very slow."
self updateArguments.
(Process
forBlock: [self doButtonAction]
runUntil: [:context | context closure == self effectiveActionTarget or: [context receiver == self effectiveActionTarget and: [context selector == self effectiveActionSelector]]])
debugWithTitle: ('Debug button action "{1}" in model "{2}"' translated format: {self label. self target printString}).!
Item was changed:
----- Method: SimpleButtonMorph>>debugAction (in category 'debug menu') -----
debugAction
+ "Evaluate the receiver's action until we see a client-specific context on the stack, ignoring intermediate glue code. Note that we first compare against #closure (or #receiver) because it is much faster than a context's #selector. This optimization is useful since such simulated execution (here: #forBlock:runUntil:) is already very slow."
+
-
(Process
forBlock: [self doButtonAction]
runUntil: [:context | context closure == self target or: [context receiver == self target and: [context selector == self actionSelector]]])
debugWithTitle: ('Debug button action "{1}" in model "{2}"' translated format: {self label. self target printString}).!
Marcel Taeumel uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-mt.2159.mcz
==================== Summary ====================
Name: Morphic-mt.2159
Author: mt
Time: 24 May 2024, 2:26:42.87333 pm
UUID: 94855197-3af8-e343-84f8-6ded7754e5b5
Ancestors: Morphic-mt.2158
Fix default drag-threshold to adhere to current scale factor. Make both #doubleClickTime and #dragThreshold preferences you can discover via Preference Browser.
Note that we allow nil in pragma-preference values to easily reset them to their default value via #cleanUp:.
=============== Diff against Morphic-mt.2158 ===============
Item was changed:
----- Method: HandMorph class>>doubleClickTime (in category 'accessing') -----
doubleClickTime
+ <preference: 'Double-click Timeout'
+ categoryList: #(Accessibility Mouse)
+ description: 'The maximum amount of milliseconds that may pass between clicks to invoke a double click operation. Custom morphs may override this value.'
+ type: #Number>
+
+ ^ DoubleClickTime ifNil: [350]
-
- ^ DoubleClickTime
!
Item was changed:
----- Method: HandMorph class>>doubleClickTime: (in category 'accessing') -----
+ doubleClickTime: millisecondsOrNil
- doubleClickTime: milliseconds
+ DoubleClickTime := millisecondsOrNil.
- DoubleClickTime := milliseconds.
!
Item was changed:
----- Method: HandMorph class>>dragThreshold (in category 'accessing') -----
dragThreshold
+ <preference: 'Drag Threshold'
+ categoryList: #(Accessibility Mouse)
+ description: 'The default number of pixels after which a drag operation should start, which means that the hand will grab some object and the user can then drop it in a suitable place. Custom morphs may override this value.'
+ type: #Number>
+
+ ^ (RealEstateAgent scaleFactor * (DragThreshold ifNil: [10])) rounded
-
- ^ DragThreshold
!
Item was changed:
----- Method: HandMorph class>>dragThreshold: (in category 'accessing') -----
+ dragThreshold: numPixelsOrNil.
- dragThreshold: pixels
+ DragThreshold := numPixelsOrNil ifNotNil: [(numPixelsOrNil / RealEstateAgent scaleFactor) rounded].!
- DragThreshold := pixels!
Item was changed:
----- Method: HandMorph>>waitForClicksOrDrag:event:selectors:threshold: (in category 'double click support') -----
waitForClicksOrDrag: aMorph event: evt selectors: clickAndDragSelectors threshold: threshold
"Wait for mouse button and movement events, informing aMorph about events interesting to it via callbacks.
This message is typically sent to the Hand by aMorph when it first receives a mouse-down event.
The callback methods, named in clickAndDragSelectors and passed a copy of evt, are:
1 (click) sent when the mouse button goes up within doubleClickTime.
2 (doubleClick) sent when the mouse goes up, down, and up again all within DoubleClickTime.
3 (doubleClickTimeout) sent when the mouse does not have a doubleClick within DoubleClickTime.
4 (startDrag) sent when the mouse moves more than threshold pixels from evt's position within DoubleClickTime.
Note that mouseMove: and mouseUp: events are not sent to aMorph until it becomes the mouse focus,
which is typically done by aMorph in its click:, doubleClick:, or drag: methods."
mouseClickState :=
MouseClickState new
client: aMorph
click: clickAndDragSelectors first
dblClick: clickAndDragSelectors second
+ dblClickTime: self class doubleClickTime
- dblClickTime: DoubleClickTime
dblClickTimeout: clickAndDragSelectors third
drag: clickAndDragSelectors fourth
threshold: threshold
event: evt.
!
Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.1069.mcz
==================== Summary ====================
Name: Collections-mt.1069
Author: mt
Time: 22 May 2024, 11:29:46.825542 am
UUID: 42a818b7-2f20-b84a-85ed-0c7cb636ab23
Ancestors: Collections-mt.1068
Updates commentary for #asCamelCase ... which is still somewhat useless without also using #asLegalSelector.
=============== Diff against Collections-mt.1068 ===============
Item was changed:
----- Method: String>>asCamelCase (in category 'converting') -----
asCamelCase
+ "Convert to CamelCase. Can be convenient in conjunction with #asLegalSelector
+ 'A man, a plan, a canal, panama' asCamelCase.
+ 'A man, a plan, a canal, panama' asCamelCase asLegalSelector.
+ 'Here 123should % be 6 the name6 of the method' asCamelCase.
+ 'Here 123should % be 6 the name6 of the method' asCamelCase asLegalSelector.
+ See also #findFeatures and #findFeaturesDo: for an inverse operation."
- "Convert to CamelCase. Can be convenient
- in conjunction with #asLegalSelector
- 'A man, a plan, a canal, panama' asCamelCase.
- 'A man, a plan, a canal, panama' asCamelCase asLegalSelector.
- 'Here 123should % be 6 the name6 of the method' asCamelCase.
- 'Here 123should % be 6 the name6 of the method' asCamelCase asLegalSelector."
^ self class streamContents: [:stream |
self substrings do: [:sub |
stream nextPutAll: sub capitalized]]!