<div id="__MailbirdStyleContent" style="font-size: 10pt;font-family: Arial;color: #000000;text-align: left" dir="ltr">
Hi Christoph --<div><br></div><div>-1</div><div><br></div><div>> <span style="color: #000000">HandMorph</span><span style="color: #000080">>></span><span style="color: #000080">#lastEvent</span><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"> now is no longer restricted to mouse events</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">But existing projects rely (e.g., NuScratch) on it being a mouse event. We cannot change that.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Also, #lastEvent must not bypass existing event filters in HandMorph to make it work in client code.</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px"><br></span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Best,</span></div><div><span style="font-family: Arial, Helvetica, sans-serif;font-size: 13px">Marcel</span></div><div class="mb_sig"></div>
<blockquote class="history_container" type="cite" style="border-left-style: solid;border-width: 1px;margin-top: 20px;margin-left: 0px;padding-left: 10px;min-width: 500px">
<p style="color: #AAAAAA; margin-top: 10px;">Am 01.04.2022 16:05:42 schrieb christoph.thiede@student.hpi.uni-potsdam.de <christoph.thiede@student.hpi.uni-potsdam.de>:</p><div style="font-family:Arial,Helvetica,sans-serif">
This is also required for interactionMode.cs. :)<br>
<br>
<b>=============== Summary ===============</b><br>
<br>
Change Set: lastEvent<br>
Date: 26 March 2022<br>
Author: Christoph Thiede<br>
<br>
Revises <span style="color: #000000">HandMorph</span><span style="color: #000080">>></span><span style="color: #000080">#lastEvent</span> to honor all real user events and refactors several senders.<br>
<br>
* <span style="color: #000000">HandMorph</span><span style="color: #000080">>></span><span style="color: #000080">#lastEvent</span> now is no longer restricted to mouse events but may answer all user events (except for virtual mouseOver events).<br>
* Refactored several senders to make use of <span style="color: #000000">MenuMorph</span><span style="color: #000080">>></span><span style="color: #000080">#popUpInWorld:</span>, <span style="color: #000000">Morph</span><span style="color: #000080">>></span><span style="color: #000080">#cursorPoint</span>, and <span style="color: #000000">Morph</span><span style="color: #000080">>></span><span style="color: #000080">#currentEvent</span>.<br>
<br>
<b>=============== Diff ===============</b><br>
<br>
<b>BookMorph>>invokeBookMenu {menu} · ct 3/26/2022 20:58 (changed)</b><br>
invokeBookMenu<br>
"Invoke the book's control panel menu."<br>
| aMenu |<br>
aMenu := MenuMorph new defaultTarget: self.<br>
aMenu addTitle: 'Book' translated.<br>
Preferences noviceMode<br>
ifFalse:[aMenu addStayUpItem].<br>
aMenu add: 'find...' translated action: #textSearch.<br>
aMenu add: 'go to page...' translated action: #goToPage.<br>
aMenu addLine.<br>
<br>
aMenu addList: {<br>
{'sort pages' translated. #sortPages}.<br>
{'uncache page sorter' translated. #uncachePageSorter}}.<br>
(self hasProperty: #dontWrapAtEnd)<br>
ifTrue: [aMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]<br>
ifFalse: [aMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].<br>
aMenu addList: {<br>
{'make bookmark' translated. #bookmarkForThisPage}.<br>
{'make thumbnail' translated. #thumbnailForThisPage}}.<br>
aMenu addUpdating: #showingPageControlsString action: #toggleShowingOfPageControls.<br>
aMenu addUpdating: #showingFullScreenString action: #toggleFullScreen.<br>
<br>
aMenu addLine.<br>
aMenu add: 'sound effect for all pages' translated action: #menuPageSoundForAll:.<br>
aMenu add: 'sound effect this page only' translated action: #menuPageSoundForThisPage:.<br>
aMenu add: 'visual effect for all pages' translated action: #menuPageVisualForAll:.<br>
aMenu add: 'visual effect this page only' translated action: #menuPageVisualForThisPage:.<br>
<br>
aMenu addLine.<br>
(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:<br>
[aMenu add: 'paste book page' translated action: #pasteBookPage].<br>
<br>
aMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.<br>
newPagePrototype ifNotNil: [<br>
aMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].<br>
<br>
aMenu add: (self dragNDropEnabled ifTrue: ['close dragNdrop'] ifFalse: ['open dragNdrop']) translated<br>
action: #changeDragAndDrop.<br>
aMenu add: 'make all pages this size' translated action: #makeUniformPageSize.<br>
<br>
aMenu<br>
addUpdating: #keepingUniformPageSizeString<br>
target: self<br>
action: #toggleMaintainUniformPageSize.<br>
aMenu addLine.<br>
<br>
aMenu add: 'send all pages to server' translated action: #savePagesOnURL.<br>
aMenu add: 'send this page to server' translated action: #saveOneOnURL.<br>
aMenu add: 'reload all from server' translated action: #reload.<br>
aMenu add: 'copy page url to clipboard' translated action: #copyUrl.<br>
aMenu add: 'keep in one file' translated action: #keepTogether.<br>
<br>
aMenu addLine.<br>
aMenu add: 'load PPT images from slide #1' translated action: #loadImagesIntoBook.<br>
aMenu add: 'background color for all pages...' translated action: #setPageColor.<br>
aMenu add: 'make a thread of projects in this book' translated action: #buildThreadOfProjects.<br>
<br>
<s><span style="color: #0000FF">- aMenu popUpEvent: self world activeHand lastEvent in: self world<br>
</span></s><span style="color: #FF0000">+ aMenu popUpInWorld: self world.<br>
</span><br>
<br>
<b>FlapTab>>hideFlapUnlessOverReferent {show & hide} · ct 3/26/2022 20:57 (changed)</b><br>
hideFlapUnlessOverReferent<br>
"Hide the flap unless the mouse is over my referent."<br>
<br>
| aWorld where |<br>
(referent isInWorld and: <br>
<s><span style="color: #0000FF">- [where := self outermostWorldMorph activeHand lastEvent cursorPoint.<br>
</span></s><span style="color: #FF0000">+ [where := self cursorPoint.<br>
</span> referent bounds containsPoint: (referent globalPointToLocal: where)])<br>
ifTrue: [^ self].<br>
(aWorld := self world) ifNil: [^ self]. "In case flap tabs just got hidden"<br>
self referent delete.<br>
aWorld removeAccommodationForFlap: self.<br>
flapShowing := false.<br>
self isInWorld ifFalse:<br>
[self inboard ifTrue: [aWorld addMorphFront: self]].<br>
self adjustPositionAfterHidingFlap<br>
<br>
<b>HandMorph (changed)</b><br>
Morph subclass: #HandMorph<br>
<s><span style="color: #0000FF">- instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler targetOffset lastMouseEvent lastKeyDownEvent damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter externalDropMorph'<br>
</span></s><span style="color: #FF0000">+ instanceVariableNames: 'mouseFocus keyboardFocus eventListeners mouseListeners keyboardListeners eventCaptureFilters mouseCaptureFilters keyboardCaptureFilters mouseClickState mouseOverHandler targetOffset lastEvent lastMouseEvent lastKeyDownEvent damageRecorder cacheCanvas cachedCanvasHasHoles temporaryCursor temporaryCursorOffset hardwareCursor hasChanged savedPatch userInitials lastEventBuffer genieGestureProcessor keyboardInterpreter externalDropMorph'<br>
</span> classVariableNames: 'CompositionWindowManager DoubleClickTime DragThreshold EventStats MinimalWheelDelta NewEventRules NormalCursor PasteBuffer SendMouseWheelToKeyboardFocus ShowEvents SynthesizeMouseWheelEvents'<br>
poolDictionaries: 'EventSensorConstants'<br>
category: 'Morphic-Kernel'<br>
<br>
HandMorph class <br>
instanceVariableNames: ''<br>
<br>
"The cursor may be thought of as the HandMorph. The hand's submorphs hold anything being carried by dragging. <br>
<br>
There is some minimal support for multiple hands in the same world."<br>
<br>
<b>HandMorph>>handleEvent: {events-processing} · ct 3/26/2022 21:15 (changed)</b><br>
handleEvent: unfilteredEvent<br>
<br>
| filteredEvent |<br>
owner ifNil: [^ unfilteredEvent "not necessary but good style -- see Morph >> #handleEvent:"].<br>
<br>
self logEvent: unfilteredEvent.<br>
<br>
"Mouse-over events occur really, really, really often. They are kind of the heart beat of the Morphic UI process."<br>
unfilteredEvent isMouseOver ifTrue: [^ self sendMouseEvent: unfilteredEvent].<br>
<br>
<span style="color: #FF0000">+ lastEvent := unfilteredEvent.<br>
</span> self showEvent: unfilteredEvent.<br>
self sendListenEvents: unfilteredEvent.<br>
<br>
filteredEvent := self sendFilterEventCapture: unfilteredEvent for: nil.<br>
"filteredEvent := unfilteredEvent" " <-- use this to disable global capture filters"<br>
<br>
filteredEvent wasIgnored ifTrue: [<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
filteredEvent isWindowEvent ifTrue: [<br>
self sendEvent: filteredEvent focus: nil.<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
filteredEvent isKeyboard ifTrue: [<br>
filteredEvent isKeyDown ifTrue: [lastKeyDownEvent := filteredEvent].<br>
self sendKeyboardEvent: filteredEvent.<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
filteredEvent isDropEvent ifTrue:[<br>
self sendEvent: filteredEvent focus: nil.<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
filteredEvent isMouse ifFalse: [<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
" ********** MOUSE EVENT *********** "<br>
<br>
lastMouseEvent := filteredEvent.<br>
<br>
"Check for pending drag or double click operations."<br>
mouseClickState ifNotNil:[<br>
(mouseClickState handleEvent: filteredEvent from: self) ifFalse:[<br>
"Possibly dispatched #click: or something and will not re-establish otherwise"<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent]].<br>
<br>
filteredEvent isMouseWheel ifTrue: [<br>
self class sendMouseWheelToKeyboardFocus<br>
ifFalse: [self sendMouseEvent: filteredEvent]<br>
ifTrue: [self sendEvent: filteredEvent focus: self keyboardFocus clear: [self keyboardFocus: nil]].<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
filteredEvent isMove ifTrue:[<br>
self position: filteredEvent position.<br>
self sendMouseEvent: filteredEvent.<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent].<br>
<br>
"Issue a synthetic move event if we're not at the position of the event"<br>
self flag: #bug. "mt: Incompatible with how #mouseMove: is handled when #wantsEveryMouseMove: answers false. Handler might think that #mouseDown: was already received. For example, TextEditor and HaloMorph will issue drags in their #mouseMove: based on old data. That is, the first #mouseMove: appears to come before #mouseDown: while actually sent due to #moveToEvent:."<br>
filteredEvent position = self position<br>
ifFalse: [self moveToEvent: filteredEvent].<br>
<br>
"Drop submorphs on button events"<br>
self hasSubmorphs<br>
ifTrue:[self dropMorphs: filteredEvent]<br>
ifFalse:[self sendMouseEvent: filteredEvent].<br>
<br>
self mouseOverHandler processMouseOver: lastMouseEvent.<br>
^ filteredEvent "not necessary but good style -- see Morph >> #handleEvent:" <br>
<br>
<b>HandMorph>>initForEvents {initialization} · ct 3/26/2022 21:03 (changed)</b><br>
<s><span style="color: #0000FF">- initForEvents<br>
</span></s><span style="color: #FF0000">+ initForEvents <br>
</span> mouseOverHandler := nil.<br>
<s><span style="color: #0000FF">- lastMouseEvent := MouseEvent new setType: #mouseMove position: 0@0 buttons: 0 hand: self.<br>
</span></s><span style="color: #FF0000">+ lastEvent := lastMouseEvent := MouseEvent new setType: #mouseMove position: 0@0 buttons: 0 hand: self.<br>
</span> lastKeyDownEvent := KeyboardEvent new setType: #keyDown buttons: 0 position: 0@0 keyValue: 0 hand: self stamp: 0.<br>
lastEventBuffer := {1. 0. 0. 0. 0. 0. nil. nil}.<br>
self resetClickState.<br>
self addKeyboardCaptureFilter: self. "to convert unusual VM events"<br>
<br>
<b>HandMorph>>lastEvent {accessing} · ct 3/26/2022 21:03 (changed)</b><br>
lastEvent<br>
<s><span style="color: #0000FF">- ^ lastMouseEvent<br>
</span></s><span style="color: #FF0000">+ <br>
+ ^ lastEvent</span><br>
<br>
<b>InternalThreadNavigationMorph>>jumpWithinThread {navigation} · ct 3/26/2022 20:57 (changed)</b><br>
jumpWithinThread<br>
<br>
| aMenu me weHaveOthers myIndex |<br>
<br>
me := Project current name.<br>
aMenu := MenuMorph new defaultTarget: self.<br>
weHaveOthers := false.<br>
myIndex := self currentIndex.<br>
listOfPages withIndexDo: [ :each :index |<br>
index = myIndex ifTrue: [<br>
aMenu add: 'you are here' translated action: #yourself.<br>
aMenu lastSubmorph color: Color red.<br>
] ifFalse: [<br>
weHaveOthers := true.<br>
aMenu add: ('jump to <{1}>' translated format:{each first}) selector: #jumpToIndex: argument: index.<br>
myIndex = (index - 1) ifTrue: [<br>
aMenu lastSubmorph color: Color blue<br>
].<br>
myIndex = (index + 1) ifTrue: [<br>
aMenu lastSubmorph color: Color orange<br>
].<br>
].<br>
].<br>
weHaveOthers ifFalse: [^self inform: 'This is the only project in this thread' translated].<br>
<s><span style="color: #0000FF">- aMenu popUpEvent: self world primaryHand lastEvent in: self world<br>
</span></s><span style="color: #FF0000">+ aMenu popUpInWorld: self world</span><br>
<br>
<b>Morph>>cursorPoint {event handling} · ct 3/26/2022 20:52 (changed)</b><br>
cursorPoint<br>
<s><span style="color: #0000FF">- ^ self currentHand lastEvent cursorPoint<br>
</span></s><span style="color: #FF0000">+ <br>
+ ^ self currentEvent position</span><br>
<br>
<b>ScrollPane>>yellowButtonActivity: {scroll bar events} · ct 3/26/2022 20:53 (changed)</b><br>
yellowButtonActivity: shiftKeyState<br>
| menu |<br>
(menu := self getMenu: shiftKeyState) ifNotNil:<br>
[menu setInvokingView: self.<br>
<s><span style="color: #0000FF">- menu popUpEvent: self activeHand lastEvent in: self world]<br>
</span></s><span style="color: #FF0000">+ menu popUpInWorld: self world]</span><br>
<br>
<b>StackMorph>>invokeBookMenu {menu} · ct 3/26/2022 20:55 (changed)</b><br>
invokeBookMenu<br>
"Invoke the book's control panel menu."<br>
<br>
| aMenu |<br>
aMenu := MenuMorph new defaultTarget: self.<br>
aMenu addTitle: 'Stack' translated.<br>
Preferences noviceMode<br>
ifFalse: [aMenu addStayUpItem].<br>
aMenu addList: {<br>
{'find...' translated. #textSearch}.<br>
{'find via this template' translated. #findViaTemplate}.<br>
{'show designations' translated. #showDesignationsOfObjects}.<br>
{'explain designations' translated. #explainDesignations}.<br>
#-.<br>
{'previous card' translated. #goToPreviousCardInStack}.<br>
{'next card' translated. #goToNextCardInStack}.<br>
{'first card' translated. #goToFirstCardOfStack}.<br>
{'last card' translated. #goToLastCardOfStack}.<br>
{'go to card...' translated. #goToCard}.<br>
#-.<br>
{'add a card of this background' translated. #insertCard}.<br>
{'add a card of background...' translated. #insertCardOfBackground}.<br>
{'make a new background...' translated. #makeNewBackground}.<br>
#-.<br>
{'insert cards from clipboard data' translated. #addCardsFromClipboardData. 'Create new cards from a formatted string on the clipboard' translated}.<br>
{'insert cards from a file...' translated. #addCardsFromAFile. 'Create new cards from data in a file' translated}.<br>
#-.<br>
{'instance variable order...' translated. #changeInstVarOrder. 'Caution -- DANGER. Change the order of the variables on the cards' translated}.<br>
{'be defaults for new cards' translated. #beDefaultsForNewCards. 'Make these current field values be the defaults for their respective fields on new cards' translated}.<br>
{'sort cards by...' translated. #sortCards. 'Sort all the cards of the current background using some field as the sort key' translated}.<br>
#-.<br>
{'delete this card' translated. #deleteCard}.<br>
{'delete all cards *except* this one' translated. #deleteAllCardsExceptThisOne}.<br>
#-.<br>
{'move card to front of stack' translated. #makeCurrentCardFirstInStack}.<br>
{'move card to back of stack' translated. #makeCurrentCardLastInStack}.<br>
{'move card one position earlier' translated. #moveCardOnePositionEarlier}.<br>
{'move card one position later' translated. #moveCardOnePositionLater}.<br>
#-.<br>
{'scripts for this background' translated. #browseCardClass}.<br>
#-.<br>
{'debug...' translated. #offerStackDebugMenu}.<br>
{'bookish items...' translated. #offerBookishMenu}}.<br>
<br>
aMenu addUpdating: #showingPageControlsString action: #toggleShowingOfPageControls.<br>
aMenu addUpdating: #showingFullScreenString action: #toggleFullScreen.<br>
<br>
<s><span style="color: #0000FF">- aMenu popUpEvent: self world activeHand lastEvent in: self world<br>
</span></s><span style="color: #FF0000">+ aMenu popUpInWorld: self world.<br>
</span><br>
<br>
<b>StackMorph>>offerBookishMenu {menu} · ct 3/26/2022 20:55 (changed)</b><br>
offerBookishMenu<br>
"Offer a menu with book-related items in it"<br>
<br>
| aMenu |<br>
aMenu := MenuMorph new defaultTarget: self.<br>
aMenu addTitle: 'Stack / Book' translated.<br>
aMenu addStayUpItem.<br>
aMenu addList:<br>
#(('sort pages' sortPages)<br>
('uncache page sorter' uncachePageSorter)).<br>
(self hasProperty: #dontWrapAtEnd)<br>
ifTrue: [aMenu add: 'wrap after last page' translated selector: #setWrapPages: argument: true]<br>
ifFalse: [aMenu add: 'stop at last page' translated selector: #setWrapPages: argument: false].<br>
aMenu addList:<br>
#(('make bookmark' bookmarkForThisPage)<br>
('make thumbnail' thumbnailForThisPage)).<br>
<br>
aMenu addLine.<br>
aMenu add: 'sound effect for all pages' translated action: #menuPageSoundForAll:.<br>
aMenu add: 'sound effect this page only' translated action: #menuPageSoundForThisPage:.<br>
aMenu add: 'visual effect for all pages' translated action: #menuPageVisualForAll:.<br>
aMenu add: 'visual effect this page only' translated action: #menuPageVisualForThisPage:.<br>
<br>
aMenu addLine.<br>
(self primaryHand pasteBuffer class isKindOf: PasteUpMorph class) ifTrue:<br>
[aMenu add: 'paste book page' translated action: #pasteBookPage].<br>
<br>
aMenu add: 'save as new-page prototype' translated action: #setNewPagePrototype.<br>
newPagePrototype ifNotNil: [<br>
aMenu add: 'clear new-page prototype' translated action: #clearNewPagePrototype].<br>
<br>
aMenu add: (self dragNDropEnabled ifTrue: ['close' translated ] ifFalse: ['open' translated]) , ' dragNdrop' translated<br>
action: #changeDragAndDrop.<br>
aMenu addLine.<br>
aMenu add: 'make all pages this size' translated action: #makeUniformPageSize.<br>
aMenu addUpdating: #keepingUniformPageSizeString target: self action: #toggleMaintainUniformPageSize.<br>
aMenu addLine.<br>
aMenu add: 'send all pages to server' translated action: #savePagesOnURL.<br>
aMenu add: 'send this page to server' translated action: #saveOneOnURL.<br>
aMenu add: 'reload all from server' translated action: #reload.<br>
aMenu add: 'copy page url to clipboard' translated action: #copyUrl.<br>
aMenu add: 'keep in one file' translated action: #keepTogether.<br>
<br>
aMenu addLine.<br>
aMenu add: 'load PPT images from slide #1' translated action: #loadImagesIntoBook.<br>
aMenu add: 'background color for all pages...' translated action: #setPageColor.<br>
<br>
<s><span style="color: #0000FF">- aMenu popUpEvent: self world activeHand lastEvent in: self world<br>
- <br>
- <br>
</span></s><span style="color: #FF0000">+ aMenu popUpInWorld: self world.<br>
</span><br>
<br>
<b>SugarNavigatorBar>>doNewPainting {button actions} · ct 3/26/2022 20:55 (changed)</b><br>
doNewPainting<br>
<br>
| w |<br>
<br>
w := self world.<br>
w assureNotPaintingElse: [^ self].<br>
<s><span style="color: #0000FF">- w makeNewDrawing: (self primaryHand lastEvent copy setPosition: w center)<br>
</span></s><span style="color: #FF0000">+ w makeNewDrawing: (self currentEvent copy setPosition: w center)<br>
</span><br>
<br>
<b>SyntaxMorph>>wantsKeyboardFocusFor: {event handling} · ct 3/26/2022 20:55 (changed)</b><br>
wantsKeyboardFocusFor: aSubmorph<br>
| doEdit |<br>
"only let strings edit on shift-click. Editing on ordinary click defeats the brown selection and tile dragging."<br>
<br>
<s><span style="color: #0000FF">- doEdit := self world primaryHand lastEvent shiftPressed.<br>
</span></s><span style="color: #FF0000">+ doEdit := self currentEvent shiftPressed.<br>
</span> doEdit ifTrue: ["remove the arrows during editing"<br>
self valueOfProperty: #myPopup ifPresentDo: [:panel |<br>
panel delete. self removeProperty: #myPopup]].<br>
^ doEdit<br>
<br>
<b>TileMorph>>showSuffixChoices {arrows} · ct 3/26/2022 20:54 (changed)</b><br>
showSuffixChoices<br>
"The suffix arrow has been hit, so respond appropriately"<br>
<br>
| plusPhrase phrase pad outer num |<br>
self currentEvent shiftPressed ifTrue: [^ self wrapPhraseInFunction].<br>
<br>
(phrase := self ownerThatIsA: PhraseTileMorph orA: FunctionTile) ifNil: [nil].<br>
<br>
(type == #literal) & (literal isNumber) ifTrue: ["Tile is a constant number"<br>
(phrase isNil or: [phrase finalTilePadSubmorph == owner]) "pad"<br>
ifTrue: ["we are adding the first time (at end of our phrase)"<br>
plusPhrase := self phraseForOp: #+ arg: 1 resultType: #Number.<br>
plusPhrase submorphs second submorphs last setBalloonText: (ScriptingSystem helpStringForOperator: #+).<br>
<s><span style="color: #0000FF">- owner acceptDroppingMorph: plusPhrase event: self primaryHand lastEvent.<br>
</span></s><span style="color: #FF0000">+ owner acceptDroppingMorph: plusPhrase event: self currentEvent.<br>
</span> num := plusPhrase firstSubmorph firstSubmorph.<br>
num deleteSuffixArrow]].<br>
<br>
(#(function expression parameter) includes: type) ifTrue:<br>
[pad := self ownerThatIsA: TilePadMorph.<br>
plusPhrase := self presenter phraseForReceiver: 1 op: #+ arg: 1 resultType: #Number.<br>
plusPhrase submorphs second submorphs last setBalloonText: (ScriptingSystem helpStringForOperator: #+).<br>
<s><span style="color: #0000FF">- pad acceptDroppingMorph: plusPhrase event: self primaryHand lastEvent.<br>
</span></s><span style="color: #FF0000">+ pad acceptDroppingMorph: plusPhrase event: self currentEvent.<br>
</span> plusPhrase firstSubmorph removeAllMorphs; addMorph: self.<br>
pad topEditor scriptEdited "recompile"].<br>
<br>
type = #operator ifTrue: ["Tile is accessor of an expression"<br>
phrase resultType == #Number ifTrue:<br>
[outer := phrase ownerThatIsA: PhraseTileMorph orA: TimesRepeatTile.<br>
pad := self ownerThatIsA: TilePadMorph.<br>
outer ifNotNil:<br>
[(outer lastSubmorph == pad or: [true]) ifTrue: [ "first time"<br>
plusPhrase := self presenter phraseForReceiver: 1 <br>
op: #+ arg: 1 resultType: #Number.<br>
plusPhrase submorphs second submorphs last setBalloonText: (ScriptingSystem helpStringForOperator: #+).<br>
<s><span style="color: #0000FF">- pad acceptDroppingMorph: plusPhrase event: self primaryHand lastEvent.<br>
</span></s><span style="color: #FF0000">+ pad acceptDroppingMorph: plusPhrase event: self currentEvent.<br>
</span> plusPhrase firstSubmorph removeAllMorphs; addMorph: phrase. "car's heading"<br>
pad topEditor scriptEdited "recompile & deal with carets"]]]].<br>
<br>
(self topEditor ifNil: [phrase ifNil: [^ self]]) enforceTileColorPolicy<br>
<br>
<b>TwoWayScrollPane>>yellowButtonActivity: {scroll bar events} · ct 3/26/2022 20:54 (changed)</b><br>
yellowButtonActivity: shiftKeyState<br>
| menu |<br>
(menu := self getMenu: shiftKeyState) ifNotNil:<br>
[menu setInvokingView: self.<br>
<s><span style="color: #0000FF">- menu popUpEvent: self activeHand lastEvent in: self world]<br>
</span></s><span style="color: #FF0000">+ menu popUpInWorld: self world]</span><br>
<br>
["lastEvent.1.cs"]<br>
<br>
<span style="color: #808080">---<br>
</span><span style="color: #808080"><i>Sent from </i></span><span style="color: #808080"><i><a href="https://github.com/hpi-swa-lab/squeak-inbox-talk"><u><span style="color: #808080">Squeak Inbox Talk</span></u></a></i></span><br>
["lastEvent.1.cs"]
</div></blockquote></div>