<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-04-16 20:43 GMT+02:00 Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On 16.04.2015, at 11:33, Nicolai Hess &lt;<a href="mailto:nicolaihess@web.de" target="_blank">nicolaihess@web.de</a>&gt; wrote:</div><br><div><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">2015-04-16 20:18 GMT+02:00 Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"> <br>On 15.04.2015, at 23:53, Nicolai Hess &lt;<a href="mailto:nicolaihess@web.de" target="_blank">nicolaihess@web.de</a>&gt; wrote:<br>
&gt;<br>
&gt; 2015-04-15 23:53 GMT+02:00 Bert Freudenberg &lt;<a href="mailto:bert@freudenbergs.de" target="_blank">bert@freudenbergs.de</a>&gt;:<br>
&gt;<br>
&gt;&gt; No idea, but just as a datapoint:<br>
&gt;&gt;<br>
&gt;&gt; The code works fine in SqueakJS (if you enlarge the form to actually show the ellipse centered at 400@400):<br>
&gt;&gt;<br>
&gt;&gt; &lt;PastedGraphic-8.png&gt;<br>
&gt;&gt;<br>
&gt;&gt; Also no idea why the gradient repeats after 260 pixels ...<br>
&gt;&gt;<br>
&gt; This looks like some &quot;wrap-around&quot; , what happens if the fill is in the upper left<br>
&gt; quarter? will the fill appear 4 times?<br>
<br>
It appears to repeat vertically only.<br>
<br>
You can easily try it for yourself. Just go to this URL, open a workspace, and paste your code in:<br></blockquote><div><br></div><div>That is not really easy:)<br></div><div>I can not copy and paste into squeakjs. And with german keyboard layout I can not even<br></div><div>tpye an @ sign.<br></div><div>(Firefox on Windows 7)<br><br></div><div>Does copy and paste work for other systems / browser?<br></div></div></div></div></div></blockquote><div><br></div><div>Ah, Chrome works best so far. Sorry. Patches welcome ;^)</div></div></div></blockquote><div><br><br></div><div>Hi Bert,<br><br></div><div>following observation:<br><br></div><div>in squeak.js,     <br>    document.onkeypress = function(evt) {<br>        if (!display.vm) return true;<br>        // check for ctrl-x/c/v/r<br>        if (/[CXVR]/.test(String.fromCharCode(evt.charCode + 64)))<br><br></div><div>this test never holds (at least not with firefox on windows).<br></div><div>The charCode is always the same, regardless whether ctrl-key is pressed or not, so it always handles those<br></div><div>shortcuts as squeak-shortcuts (ctrl+v is handled as &quot;paste author initials&quot;, not as &quot;paste text to browser window&quot;)<br></div><div>(this is not an issue for chrome, because it does not use keypress, but the keydown events for cut&amp;paste)<br><br></div><div>changing this to<br><br>        if (evt.ctrlKey &amp;&amp; /[cxvr]/.test(String.fromCharCode(evt.charCode)))<br></div><div>makes it working.<br><br></div><div>another issue is, that in firefox on windows, the &quot;paste event&quot; is never fired for non-editable htmlelements (it works for textareas and inputfields).<br></div><div>But we can make the whole document &quot;editable&quot; with<br></div><div>document.body.contentEditable = true<br></div><div>(maybe it is enough to do this for the canvas elemement).<br><br></div><div>with this changes, copy , cut &amp; paste are working in firefox (only tested on windows).<br><br></div><div>about typing &#39;@&#39; sign with german keyboard layout, I commented at the bugtracker issue <br><a href="https://github.com/bertfreudenberg/SqueakJS/issues/24">https://github.com/bertfreudenberg/SqueakJS/issues/24</a><br><br></div><div><br></div><div>nicolai<br></div><div><br></div><div></div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div style="word-wrap:break-word"><div><br><blockquote type="cite"><div><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
<a href="http://tinyurl.com/mks6psd" target="_blank">http://tinyurl.com/mks6psd</a><br>
<br>
&gt; How would JS react on a wrong array access? Throwing an exception?<br>
<br>
No. It&#39;s just a no-op.<br>
<br>
- Bert -<br>
<br>
<br>
<br>
<br></blockquote></div><br></div></div>
</div></blockquote></div><br><div>
<span style="border-collapse:separate;border-spacing:0px;color:rgb(0,0,0);font-family:&quot;Lucida Grande&quot;;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div style="word-wrap:break-word"><div style="font-family:Helvetica"><span style="font-family:Helvetica">- Bert -</span></div><div style="font-family:Helvetica"><span style="font-family:Helvetica"><br></span></div></div></span></div></div><br></blockquote></div><br></div></div>