<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><font size="4">Is there any reason drag event is not implemented
as a property?<br>
</font></p>
<p><!-- HTML generated using hilite.me --></p>
<div
style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.1em .6em;">
<table>
<tbody>
<tr>
<td>
<pre style="margin: 0; line-height: 125%">1
2
3
4</pre>
</td>
<td>
<pre style="margin: 0; line-height: 125%"><span
style="color: #BB0066; font-weight: bold">Morph</span><span
style="color: #0066BB; font-weight: bold">>>dragEvent:</span> <span
style="color: #996633">aMouseEvent</span> <span
style="color: #0066BB; font-weight: bold">localPosition:</span> <span
style="color: #996633">aPoint</span>
<span style="color: #996633">aMouseEvent</span> <span
style="color: #0066BB; font-weight: bold">hand</span> <span
style="color: #0066BB; font-weight: bold">halo:</span> <span
style="color: #007020">nil</span>.
<span style="color: #996633">aMouseEvent</span> <span
style="color: #0066BB; font-weight: bold">hand</span> <span
style="color: #0066BB; font-weight: bold">grabMorph:</span> <span
style="color: #007020">self</span>
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><font size="4">contrary to other mouse events as :<br>
</font></p>
<p><!-- HTML generated using hilite.me --></p>
<div
style="background: #ffffff; overflow:auto;width:auto;border:solid gray;border-width:.1em .1em .1em .8em;padding:.1em .6em;">
<table>
<tbody>
<tr>
<td>
<pre style="margin: 0; line-height: 125%">1
2
3
4
5
6
7
8</pre>
</td>
<td>
<pre style="margin: 0; line-height: 125%"><span
style="color: #BB0066; font-weight: bold">Morph</span><span
style="color: #0066BB; font-weight: bold">>>mouseButton1Down:</span> <span
style="color: #996633">aMouseButtonEvent</span> <span
style="color: #0066BB; font-weight: bold">localPosition:</span> <span
style="color: #996633">localEventPosition</span>
<span style="color: #888888">"Handle a mouse down event.</span>
<span style="color: #888888"> This message will only be sent to Morphs that answer true to #handlesMouseDown:"</span>
<span style="color: #888888">"Allow instances to dynamically use properties for handling common events."</span>
<span style="color: #007020">self</span>
<span style="color: #0066BB; font-weight: bold">valueOfProperty:</span> <span
style="color: #FF0000; background-color: #FFAAAA">#</span><span
style="background-color: #fff0f0">'<a class="moz-txt-link-freetext" href="mouseButton1Down:localPosition">mouseButton1Down:localPosition</a>:'</span>
<span style="color: #0066BB; font-weight: bold">ifPresentDo:</span> [ <span
style="color: #333333">:</span><span
style="color: #996633">handler</span> <span
style="color: #333333">|</span> <span
style="color: #996633">handler</span> <span
style="color: #0066BB; font-weight: bold">value:</span> <span
style="color: #996633">aMouseButtonEvent</span> <span
style="color: #0066BB; font-weight: bold">value:</span> <span
style="color: #996633">localEventPosition</span> ]
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<p><font size="4">If I am right it makes impossible to add
programmatically drag event handler to arbitrary Morph. You will
have to subclass such Morph to add the behavior you want.</font></p>
<p><font size="4">Am I right or do I miss something?</font></p>
<p><font size="4">Thanks<br>
</font></p>
<pre class="moz-signature" cols="72">--
<a class="moz-txt-link-freetext" href="http://mamot.fr/@drgeo">http://mamot.fr/@drgeo</a></pre>
</body>
</html>