<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<p></p>
<p style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
Hi Marcel, thanks for the feedback & merge! :-)</p>
<div id="Signature" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt;">
<div name="divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif, serif, EmojiFont;">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin: 0px;"><font style="font-family: Calibri, Arial, Helvetica, sans-serif, serif, EmojiFont;"><font size="3" color="black"><span style="font-size: 12pt;"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<div id="divtagdefaultwrapper" dir="ltr" style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 12pt;">
<br>
</div>
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">One </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">part
 of the patch remains to be reviewed </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">that you </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">did
 not yet merge because it requires additional discussion; I'm speaking about the SystemLaunchEvent feature</span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">.
 I'd like to </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">ask everyone interested </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">in
 this proposal to have a look at my original changeset, but because I know its easier just to read this email without downloading and trying out anything, I'm citing the relevant diff here again:</span>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div>
<div class="_rp_T4" id="Item.MessagePartBody">
<div class="_rp_U4 ms-font-weight-regular ms-font-color-neutralDark rpHighlightAllClass rpHighlightBodyClass" id="Item.MessageUniqueBody" style="font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont">
<div dir="ltr">
<div id="divtagdefaultwrapper"><font face="Calibri,Helvetica,sans-serif,EmojiFont,Apple Color Emoji,Segoe UI Emoji,NotoColorEmoji,Segoe UI Symbol,Android Emoji,EmojiSymbols">
<div id="Signature">
<div style="margin:0px"><font style="font-family:Calibri,Arial,Helvetica,sans-serif,serif,EmojiFont">
<div><font size="3" color="black"><span style="font-size:12pt"><a href="http://www.hpi.de/" target="_blank" rel="noopener noreferrer" id="LPNoLP"><font size="2"><span id="LPlnk909538"><font color="#757B80"></font></span></font></a></span></font></div>
</font></div>
</div>
</font></div>
</div>
</div>
</div>
</div>
<div><font size="2" color="#808080"></font></div>
</div>
</div>
</div>
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
</div>
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<pre style="overflow-wrap: break-word; white-space: pre-wrap;"><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><span style="font-size: 8pt;">MorphicEvent subclass: #SystemLaunchEvent
        instanceVariableNames: 'arguments wasHandled'
        classVariableNames: ''
        poolDictionaries: ''
        category: 'Morphic-Events'!

</span></pre><span style="font-size: 8pt;">!SystemLaunchEvent commentStamp: 'ct 1/18/586455 02:22' prior: 0!
I am signaled by the VM that is configured as a singleton application when it has been invoked with a new image file.

This feature is also known as #launchDrop as well as under several platform-specific names:

        Unix - runAsSingleInstance
        Win32 - RunSingleApp

Instance Variables
        arguments:              A collection of FileStreams.
        wasHandled:             A Boolean.!
</span></pre>
<div><br>
</div>
<pre style="overflow-wrap: break-word; white-space: pre-wrap;"><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><span style="font-size: 8pt;">!Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:31'!
handlesSystemLaunch: evt
        "Do I want to receive #systemLaunch: when the VM instance is invoked with a second image file? See #handleSystemLaunch:."

        ^ false! !

!Morph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:36'!
systemLaunch: evt
        "Handle a systemLaunch event, signaled when the VM instance is invoked with a second image file. See #handleSystemLaunch:. Hook for subclasses."! !

</span></pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><span style="font-size: 8pt;">!Morph methodsFor: 'events-processing' stamp: 'ct 10/15/2020 19:32'!
handleSystemLaunch: anEvent
        "Handle a system launch event from the OS. Signaled if them VM is configured as a singleton application when it has been invoked again with a second image file. See SystemLaunchEvent comment."

        anEvent wasHandled ifTrue: [^ self]. "not interested"
        (self handlesSystemLaunch: anEvent) ifFalse: [^ self].
        anEvent wasHandled: true.
        self systemLaunch: anEvent.! !

</span></pre><pre style="overflow-wrap: break-word; white-space: pre-wrap;"><span style="font-size: 8pt;">!PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:32'!
handlesSystemLaunch: anEvent

        ^ self isWorldMorph! !

!PasteUpMorph methodsFor: 'event handling' stamp: 'ct 10/15/2020 19:57'!
systemLaunch: anEvent
        "Handle a number of files the singleton VM was called with again. See SystemLaunchEvent comment."

        self flag: #todo. "Do something more useful with the image here, e. g. tell the VM to load it."
        ^ self dropFiles: anEvent arguments event: anEvent! !

</span></pre><span style="font-size: 8pt;">!HandMorph methodsFor: 'private events' stamp: 'ct 1/18/586455 10:01'!
generateDropFilesEvent: evtBuf 
        "Generate the appropriate mouse event for the given raw event buffer."

        | position buttons modifiers stamp numFiles dragType |
        stamp := evtBuf second.
        stamp = 0 ifTrue: [stamp := Time eventMillisecondClock].
        dragType := evtBuf third.
        position := evtBuf fourth @ evtBuf fifth.
        buttons := 1. "red" "hacked because necessary for correct mouseMoveDragging handling"
        modifiers := evtBuf sixth.
        buttons := buttons bitOr: (modifiers bitShift: 3).
        numFiles := evtBuf seventh.
        
        dragType caseOf: {
                </span><span style="font-size: 8pt;">...</span><span style="font-size: 8pt;">
                [4] -> [ "dragDrop"
                        | oldButtons |
                        </span><span style="background-color: rgb(255, 255, 0); font-size: 8pt;">externalDropMorph ifNil: [
                                "dragDrop has been sent without prior dragging. This happens if the VM is configured as a singleton application and has been called again (aka #launchDrop)."
                                ^ SystemLaunchEvent new
                                        setArguments: (self collectDropFilesAndDirectories: numFiles)
                                        source: self
                                        stamp: stamp].</span><span style="font-size: 8pt;">
                        ...</span></pre>
</div>
</div>
</blockquote>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
So the question is: Do we need an additional event class for this, and if yes, how do we want to propagate these events?</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
I have already spent some thoughts on this before submitting the changeset, and I did not want to make this event exclusive for the world only but accessible for every morph. However, was this a good idea, or would this be a rather different approach from how
 "system events" work (or should work)?</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
A good precedent may be WindowEvent which is indeed dispatched to the world morph only - at least at the moment. I'm trying to construct an example where another morph could be interested in these events, too. For example, a tool might have opened a session
 to some critical external system, maybe an SSH shell, and this tool would like to output an extra warning to the user when a #windowClose event is received. However, should it get access to WindowEvents for this purpose, or should they be hidden behind the
 PasteUpMorph facade and we would prefer to design some high-level hook on the world instead which the SSH tool then could register itself against as a "critical operation"? (NB: The shutDown list would not be the right solution in this fictive example - when
 #shutDown: is called, the shutdown operation is already in progress which would be "too late" for our tool to reject the shutdown.)</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
I'm pretty sure we can conduct more or less the same debate for the new proposed SystemLaunchEvent because a <span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">SystemLaunchEvent
 is basically very similar to a WindowEvent, just without a position but with one or multiple file paths (internally: file streams).</span></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">Should you be able to watch an event like this using HandMorph >> #showEvents:?
 I think so.</span></div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">Should you be able to </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">receive
 an event like this using an event listener</span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">? </span><span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;">Probably?</span><br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<span style="font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols; font-size: 16px;"></span>Should you be able to intercept an event like this using an
 event filter? I don't know, but could it harm?</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Should every morph be able to subscribe to events like this by overriding #handlesSystemLaunch:? I have no idea ...<br>
<br>
So I'm looking forward to your opinions on this issue ... Do we need a new event class for this, or does it suffice to tell the PasteUpMorph a "private message" only? My versions browser for #generateDropFilesEvent: contains this old version, too, which would
 be pretty much our alternative:</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;">
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<div>generateDropFilesEvent: evtBuf </div>
<div><span style="white-space:pre"></span>"Generate the appropriate mouse event for the given raw event buffer."</div>
<div><br>
</div>
<div><span style="white-space:pre"></span>...</div>
<div></div>
<div><span style="white-space:pre"></span></div>
<div><span style="white-space:pre"></span>dragType caseOf: {</div>
<div><span style="white-space:pre"></span>...</div>
<div></div>
<div><span style="white-space:pre"></span>[4] -> [ "dragDrop"</div>
<div><span style="white-space:pre"></span>| oldButtons |</div>
<div><span style="white-space:pre"></span>externalDropMorph ifNil: [</div>
<div><span style="white-space:pre"></span>| filesAndDirectories |</div>
<div><span style="white-space:pre"></span>"dragDrop has been sent without prior dragging. This happens if the VM is configured as a singleton application and has been called again (aka #launchDrop)."</div>
<div><span style="white-space:pre"></span>filesAndDirectories := self collectDropFilesAndDirectories: numFiles.</div>
<div><span style="white-space:pre"></span>self flag: #todo. "ct: Do we need an extra event class for this?"</div>
<div><span style="white-space:pre"></span>self world launchDropFiles: filesAndDirectories event: (MorphicUnknownEvent new</div>
<div><span style="white-space:pre"></span>setType: #launchDrop argument: filesAndDirectories hand: self stamp: stamp).</div>
<div><span style="white-space:pre"></span>^ nil].</div>
</div>
</blockquote>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Your two cents please! :-)</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
<br>
</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Best,</div>
<div style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif, EmojiFont, "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;" dir="ltr">
Christoph<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block; width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Von:</b> Taeumel, Marcel<br>
<b>Gesendet:</b> Montag, 2. November 2020 16:40 Uhr<br>
<b>An:</b> Thiede, Christoph; squeak-dev@mail.squeak.org<br>
<b>Betreff:</b> Re: Changeset: Enhanced integration of drag'n'drop from host</font>
<div> </div>
</div>
<div>
<div id="__MailbirdStyleContent" style="font-size:10pt; font-family:Arial; color:#000000">
Done and merged into Trunk.
<div><br>
</div>
<div>Best,</div>
<div>Marcel</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">
<p style="color:#AAAAAA; margin-top:10px">Am 26.10.2020 07:47:02 schrieb Marcel Taeumel <marcel.taeumel@hpi.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="__MailbirdStyleContent" style="font-size:10pt; font-family:Arial; color:#000000">
Hi Christoph!
<div><br>
</div>
<div>This is great news! I will take a look at it and test it for the Windows platform.</div>
<div><br>
</div>
<div>Best,</div>
<div>Marcel</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">
<p style="color:#AAAAAA; margin-top:10px">Am 23.10.2020 14:11:28 schrieb Thiede, Christoph <christoph.thiede@student.hpi.uni-potsdam.de>:</p>
<div style="font-family:Arial,Helvetica,sans-serif">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p></p>
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<p>Hi all! :-) I'm glad to officially submit my dropFiles changeset today, finally. It enhances the integration of drag'n'drop (DnD) events delivered by the VM from the host operating system to the image, following one of Marcel's ideas: Instead of generating separate
 DropFilesEvent instances, every DnD event from the VM is translated into a TransferMorph that can be dragged into every morph or tool like every other Morph of TransferMorph, too.</p>
<p><br>
</p>
<p><img naturalheight="592" naturalwidth="952" size="133740" id="img149849" height="180" width="289" style="user-select: none;" tabindex="0" src="cid:9eca4e4e-37b5-47f0-baa1-8223bba9ae2b"><br>
</p>
<p><br>
</p>
<p><b>What is the goal of this changeset?</b></p>
<p>This design change entails two key advantages: First, every dragged host element is represented by a first-class object (which is a TransferMorph) instance. Second, as a consequence, applications do no longer need to implement a separate protocol <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">for </span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">handling </span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">host </span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">DnDs</span> (which was #dropFiles:/#wantsDropFiles:)
 but only need to provide one single proper implementation of #<span>acceptDroppingMorph:event:/#<span>wantsDroppedTransferMorph:. In particular, this also enables developers who use the ToolBuilder(Spec) framework to handle contents dropped from the host system
 since the old dropFiles protocol was never forwarded to the ToolBuilder framework.</span></span></p>
<p><span><span><br>
</span></span></p>
<p><span><span><b>How does it work?</b></span></span></p>
<p><span><span>There have already been complete implementations of the DropPlugin on the VM side for all important platforms (Windows, Linux, and macOS) for a long time (almost 20 years ...) which record </span></span><span style="font-size:12pt">four different
 types of drag events, namely: #dragEnter, #dragMove, #dragLeave, and #dragDrop. However, until now, only the last of them, #dragDrop, has been handled on the image side (see <span>HandMorph >> #generateDropFilesEvent:). The main work of this changeset can
 be found in just this method where I added support for the other drag types in order to create, move, and release a TransferMorph accordingly. Other changes include:</span></span></p>
<p></p>
<ul style="margin-bottom:0px; margin-top:0px">
<li><span style="font-size:12pt"><span>Deprecated, but kept working the old DropFilesEvent protocol (these events are still processed, but a DeprecationWarning is signaled if any morph actually handles them).</span></span></li><li><span style="font-size:12pt"><span>
<div>Migrated the only implementation of the old dropFiles protocol, which is PasteUpMorph, to the unified TransferMorph protocol.</div>
</span></span></li><li>
<div><span style="font-size:12pt">Introduced a new event class + protocol for SystemLaunchEvent (aka #launchDrop) which is generated
</span><span style="font-size:12pt">by a singleton VM when it has been invoked with a new image file (see class comment). That #launchDrop is a curious hack on the VM side to reuse the DnD protocol but has completely different semantics that now are separated
 on the image side.</span></div>
</li><li>Implemented the SystemLaunchEvent protocol on PasteUpMorph.</li></ul>
<div>Besides the changeset, I have also fixed a few minor inconsistencies with several VM-specific implementations in the OpenSmalltalk-VM repository (see
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508" class="OWAAutoLink">
#508</a>, <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/514" class="OWAAutoLink">
#514</a>, and <a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/518" class="OWAAutoLink">#518</a>) that have already been merged (thanks to all reviewers!).</div>
<div><br>
</div>
<div><b>What's the current state of the changeset?</b></div>
<div>I have <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">successfully </span>tested the changeset on Windows (Win 2004) and
 Ubuntu/X11. Also, I made sure it works with Squeak.js and TruffleSqueak. However, I do not have any possibility to test it on the <span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">O</span><span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">SVM
 implementations for </span>macOS and iOS, so your help and feedback especially for these platforms will be greatly appreciated!</div>
<div>Please see the attached demo video on how to test the changeset: Simply drag some files into an inspector field or a workspace and you should receive a list of FileStreams and/or FileDirectories. Also, aborting a drag operation should not fail, i.e. drag
 a file over the image but then drop the file in another window.</div>
<div><br>
</div>
<div><b>What's next?</b></div>
<div>There is much more potential for a comfortable host DnD integration! Concretely, I am having two downstream goals in mind: First, dropping other content types besides files and/or directories in your image, such as texts or images (currently, the DropPlugin
 implementations that I could try out are restricted to the former two types). Second, dragging objects out of the VM to save them as a file, or even better, to drop them in a second image! Vanessa
<a href="https://github.com/OpenSmalltalk/opensmalltalk-vm/pull/508#issuecomment-655021654" class="OWAAutoLink">
has told me</a> that this was even possible in the past for certain platforms, but unfortunately, the relevant code appears to be dead nowadays. Nevertheless, I have stumbled upon a lot of stubs for both features in the DropPlugin and HandMorph code, and I'm
 looking forward to reviving them in some interesting follow-up projects!</div>
<div><br>
</div>
<div><b>Which related contributions/discussions are there else?</b></div>
<div>
<ul style="margin-bottom:0px; margin-top:0px">
<li>System-ct.1156 (Inbox, <span>fixes double prompt for handling a dropped file when the first dialog was canceled; </span>not included in the changeset)<b></b><br>
</li><li><a href="http://forum.world.st/Please-try-out-Inspector-Refactoring-tp5114974p5116422.html" class="OWAAutoLink">[squeak-dev] <span>Re: Please try out | Inspector Refactoring =)</span></a> (the thread contains some interesting brainstorming about MIME type
 support for dragging inside the image)<br>
</li></ul>
</div>
<div><br>
</div>
<div>Please test and review! And many thanks to Marcel for his helpful tips!</div>
<div><br>
</div>
<div>Best,</div>
<div>Christoph</div>
<p></p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:rgb(0,0,0); font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div><span style="font-size:10pt; color:#808080"></span></div>
</div>
</div>
</div>
</div>
<p></p>
</div>
<p></p>
</div>
</div>
</blockquote>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</div>
</body>
</html>