<meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Is //modification a new way of doing comments?<br><br>Sent from my iPhone&nbsp;</div><div><br>On Aug 22, 2016, at 11:45 AM, Ron Teitelbaum [via Smalltalk] &lt;<a href="/user/SendEmail.jtp?type=node&node=4912226&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:<br><br></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' type="cite"><div>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta name="Generator" content="Microsoft Word 14 (filtered medium)"><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--><div class="WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hi Roger!&nbsp; <o:p></o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p>&nbsp;</o:p></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">That was a nice try!<o:p></o:p></span></p><p class="MsoNormal"><o:p>&nbsp;</o:p></p><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">I modified methods:<br><br><span class="im">addCustomMenuItems: aCustomMenu hand: aHandMorph</span><br><span class="im">&nbsp;&nbsp;&nbsp; super addCustomMenuItems: aCustomMenu hand:&nbsp; aHandMorph.</span><br><span class="im">&nbsp;&nbsp;&nbsp; aCustomMenu add: 'clear' action: #clear.</span><br>&nbsp;&nbsp;&nbsp; drawColor := Color red.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //modification<br>&nbsp;&nbsp;&nbsp; drawColor := Color yellow.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //modification<br>&nbsp;&nbsp;&nbsp; drawColor := Color green.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; //modification<br>&nbsp;&nbsp;&nbsp; drawColor := Color blue.&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; //modification<span style="color:#1F497D"><o:p></o:p></span></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">[Ron Teitelbaum]<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">What this does is create a menu with one item clear and then it sets the drawColor to red yellow green and then blue.&nbsp; Since blue is the last color you end up with blue.<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Try creating drawRed, drawYellow, drawGreen, and drawBlue methods<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">For example<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">drawRed<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drawColor := Color red.<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Now add to your menu properly.<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><span class="im">aCustomMenu add: 'clear' action: #clear.</span><br><span class="im">aCustomMenu add: 'red' action: #drawRed.<o:p></o:p></span></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Where add is what you see in your menu and action is what happens when you select the menu item.&nbsp; (it calls: self drawRed)<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Do that with all your colors and you should be all set!<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">You can also add menu items to adjust the size of the brush.&nbsp; Maybe make small brush, medium brush and large brush menu items?&nbsp; Works the same way as changing color.&nbsp; You need a brushSize instance variable. And initialize brushSize := 2.<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">All the best,<o:p></o:p></span></i></b></p><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Ron Teitelbaum<br></span></i></b><br>initialize<br>&nbsp;&nbsp;&nbsp; super initialize.<br>&nbsp;&nbsp;&nbsp; self extent: 500@700.<br>&nbsp;&nbsp;&nbsp; drawColor := Color black.<br><br><span class="im">mouseDown: evt</span><br><span class="im">&nbsp;&nbsp;&nbsp; brush := Pen newOnForm: form.</span><br>&nbsp;&nbsp;&nbsp; brush roundNib: 2.<br>&nbsp;&nbsp;&nbsp; brush color: drawColor. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; //modification<br><span class="im">&nbsp;&nbsp;&nbsp; lastMouse := evt cursorPoint - bounds origin.</span><br><span class="im">&nbsp;&nbsp;&nbsp; brush drawFrom: lastMouse to: lastMouse.</span><br><span class="im">&nbsp;&nbsp;&nbsp; self invalidRect:</span><br><span class="im">&nbsp;&nbsp;&nbsp; ((lastMouse - brush sourceForm extent corner:</span><br><span class="im">&nbsp;&nbsp;&nbsp; lastMouse + brush sourceForm extent)</span><br><span class="im">&nbsp;&nbsp;&nbsp; translateBy: bounds origin).</span><br><br><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><o:p></o:p></span></i></b></p></div><div><p class="MsoNormal">The initial color is black.<o:p></o:p></p></div><p class="MsoNormal">When i click the command "change color" on the menu&nbsp; and i chose for example the green color, the result is the blue color. I don't understand why ?<o:p></o:p></p></div><p class="MsoNormal" style="margin-bottom:12.0pt">And after the first choice, i must restart the program with the Workspace for change another color. So i can't make several choices at the same time.<br><br>How can I solve these problems ? and to change size of the brush ? <o:p></o:p></p></div><p class="MsoNormal">Thank you in advance.<o:p></o:p></p></div><div><p class="MsoNormal"><o:p>&nbsp;</o:p></p><div><p class="MsoNormal">2016-08-21 3:14 GMT+02:00 Ron Teitelbaum &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;:<o:p></o:p></p><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> roger mpouma<br><b>Sent:</b> Saturday, August 20, 2016 2:42 PM</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">How can i make&nbsp; this please ?<o:p></o:p></p></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I thought to add "color" and "size" commands as "clear" command in the custom menu code. After that, add "color" and "size" methods...<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">[Ron Teitelbaum] </span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">What I was thinking is making buttons on the panel. Color buttons with a highlight around it so you can see what is selected.&nbsp; You could instead add something like Red or Blue to the menu.</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">On your class add some instance variable called drawColor or something like that.</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">When the menu item Red is called you would do </span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">drawColor := Color red.</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Then in mouseDown:</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><i><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span></i></b><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;&nbsp;&nbsp; brush color: drawColor.<o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Initialize your color to something like black</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Initialize</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drawColor := Color black.</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">So that the user is not required to use the menu to get the default color (black).</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Hope that helps,</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D"><br>Ron</span><o:p></o:p></p></div><div><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2016-08-20 20:26 GMT+02:00 Ron Teitelbaum &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;:<o:p></o:p></p><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Have you considered having a menu bar with colors and line sizes.&nbsp; The users can select the color and line size which will change your program to use those settings.</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">All the best,</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">Ron Teitelbaum</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;color:#1F497D">&nbsp;</span><o:p></o:p></p><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span style="font-size:10.0pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> <a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=2" target="_top" rel="nofollow" link="external">[hidden email]</a> [mailto:<a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=3" target="_top" rel="nofollow" link="external">[hidden email]</a>] <b>On Behalf Of </b>roger mpouma<br><b>Sent:</b> Saturday, August 20, 2016 1:51 PM<br><b>To:</b> A friendly place to get answers to even the most basic questions about Squeak.<br><b>Subject:</b> Re: [Newbies] Project on squeak language</span><o:p></o:p></p><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p><div><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">I have already implemented the canvas on which we draw, the possibility of drawing with the brush but with only a single color and a single size, a capacity to erase what we have already drawn with the "Clear" command on the custom menu code. <br>So, i'd like to add the possibility of changing the color and the size of the brush presenting the choices of color and brush size.<o:p></o:p></p></div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">The differents methods are:<o:p></o:p></p></div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">"Methods"<o:p></o:p></p></div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">extent: aPoint<br>&nbsp;&nbsp;&nbsp; | newForm |<br>&nbsp;&nbsp;&nbsp; super extent: aPoint.<br>&nbsp;&nbsp;&nbsp; newForm := Form extent: self extent depth: 16.<br>&nbsp;&nbsp;&nbsp; newForm fillColor: Color veryLightGray.<br>&nbsp;&nbsp;&nbsp; form ifNotNil: [form displayOn: newForm].<br>&nbsp;&nbsp;&nbsp; form := newForm.<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>initialize<br>&nbsp;&nbsp;&nbsp; super initialize.<br>&nbsp;&nbsp;&nbsp; self extent: 500@350.<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>drawOn: aCanvas<br>&nbsp;&nbsp;&nbsp; aCanvas image: form at: bounds origin.<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>handlesMouseDown: evt<br>&nbsp;&nbsp;&nbsp; ^ true&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>mouseDown: evt<br>&nbsp;&nbsp;&nbsp; brush := Pen newOnForm: form.<br>&nbsp;&nbsp;&nbsp; brush roundNib: 3.<br>&nbsp;&nbsp;&nbsp; brush color: Color red.<br>&nbsp;&nbsp;&nbsp; lastMouse := evt cursorPoint - bounds origin.<br>&nbsp;&nbsp;&nbsp; brush drawFrom: lastMouse to: lastMouse.<br>&nbsp;&nbsp;&nbsp; self invalidRect:<br>&nbsp;&nbsp;&nbsp; ((lastMouse - brush sourceForm extent corner:<br>&nbsp;&nbsp;&nbsp; lastMouse + brush sourceForm extent)<br>&nbsp;&nbsp;&nbsp; translateBy: bounds origin).<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>mouseMove: evt<br>&nbsp;&nbsp;&nbsp; | p |<br>&nbsp;&nbsp;&nbsp; p := evt cursorPoint - bounds origin.<br>&nbsp;&nbsp;&nbsp; p = lastMouse ifTrue: [^ self].<br>&nbsp;&nbsp;&nbsp;&nbsp; brush drawFrom: lastMouse to: p.<br>&nbsp;&nbsp;&nbsp; self invalidRect: ((<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((lastMouse min: p) - brush sourceForm extent) corner:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ((lastMouse max: p) + brush sourceForm extent))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; translateBy: bounds origin).<br>&nbsp;&nbsp;&nbsp; lastMouse := p.<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>addCustomMenuItems: aCustomMenu hand: aHandMorph<br>&nbsp;&nbsp;&nbsp; super addCustomMenuItems: aCustomMenu hand: aHandMorph.<br>&nbsp;&nbsp;&nbsp; aCustomMenu add: 'clear' action: #clear.<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>clear<br>&nbsp;&nbsp;&nbsp; form fillColor: Color veryLightGray.<br>&nbsp;&nbsp;&nbsp; self changed.<o:p></o:p></p></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">"Class PaintMorph"<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">Morph subclass: #PaintMorph<br>&nbsp;&nbsp;&nbsp; instanceVariableNames: 'form brush lastMouse'<br>&nbsp;&nbsp;&nbsp; classVariableNames: ''<br>&nbsp;&nbsp;&nbsp; poolDictionaries: ''<br>&nbsp;&nbsp;&nbsp; category: 'Morphic-Fun'<o:p></o:p></p></div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">"Workspace"<br>PaintMorph new openInWorld.<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p></div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thank you in advance.<o:p></o:p></p></div></div></div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">2016-08-20 18:47 GMT+02:00 Bert Freudenberg &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=4" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt;:<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Sure. Just ask some specific questions - e.g. what you tried, what worked, what didn't etc.<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p></div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">- Bert -<o:p></o:p></p><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p><div><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Sat, Aug 20, 2016 at 10:59 AM, roger mpouma &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=5" target="_top" rel="nofollow" link="external">[hidden email]</a>&gt; wrote:<o:p></o:p></p></div></div><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' style="border-left:2px solid #CCCCCC;padding:0 1em"><div><div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Hello, <br>I need help for a drawing project on Squeak. I'd like implement a canvas on which we draw with the possibility of drawing with brush changing the color and size of the brush. Is it possibile to have help ?<br><br>Thank you in advance. <o:p></o:p></p></div></div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">_______________________________________________<br>Beginners mailing list<br><a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=6" target="_top" rel="nofollow" link="external">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><o:p></o:p></p></blockquote></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p></div></div></div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>_______________________________________________<br>Beginners mailing list<br><a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=7" target="_top" rel="nofollow" link="external">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><o:p></o:p></p></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p></div></div></div></div></div><p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt"><br>_______________________________________________<br>Beginners mailing list<br><a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=8" target="_top" rel="nofollow" link="external">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><o:p></o:p></p></div><p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">&nbsp;<o:p></o:p></p></div></div></div></div></div><p class="MsoNormal" style="margin-bottom:12.0pt"><br>_______________________________________________<br>Beginners mailing list<br><a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=9" target="_top" rel="nofollow" link="external">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><o:p></o:p></p></div><p class="MsoNormal"><o:p>&nbsp;</o:p></p></div></div><br>_______________________________________________
<br>Beginners mailing list
<br><a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=10" target="_top" rel="nofollow" link="external">[hidden email]</a>
<br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top" rel="nofollow" link="external">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br>

        
        
        
        <br>
        <br>
        <hr noshade="noshade" size="1" color="#cccccc">
        <div style="color:#444; font: 12px tahoma,geneva,helvetica,arial,sans-serif;">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html" target="_top" rel="nofollow" link="external">http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html</a>
        </div>
        <div style="color:#666; font: 11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                To start a new topic under Squeak - Beginners, email <a href="/user/SendEmail.jtp?type=node&node=4912226&i=1" target="_top" rel="nofollow" link="external">[hidden email]</a> <br>
                To unsubscribe from Squeak - Beginners, <a href="" target="_top" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://forum.world.st/template/NamlServlet.jtp?macro=macro_viewer&amp;id=instant_html%21nabble%3Aemail.naml&amp;base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&amp;breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_top" link="external">NAML</a>
        </div></div></blockquote>

        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://forum.world.st/Project-on-squeak-language-tp4912035p4912226.html">Re: Project on squeak language</a><br/>
Sent from the <a href="http://forum.world.st/Squeak-Beginners-f107673.html">Squeak - Beginners mailing list archive</a> at Nabble.com.<br/>