<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.im
        {mso-style-name:im;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[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]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From: </span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Joseph Alotta<br><b>Sent:</b> Monday, August 22, 2016 1:50 PM<o:p></o:p></span></p><p class=MsoNormal><o:p>&nbsp;</o:p></p><div><p class=MsoNormal>Is //modification a new way of doing comments?<br><br><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[Ron Teitelbaum] <o:p></o:p></span></i></b></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Good question Joe,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I assumed it was added to the email and not to code.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>The comments would require quotes: &#8220; this is a comment &#8220;<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>All the best,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Ron Teitelbaum<o:p></o:p></span></p><p class=MsoNormal><br>Sent from my iPhone&nbsp;<o:p></o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>On Aug 22, 2016, at 11:45 AM, Ron Teitelbaum [via Smalltalk] &lt;<a href="/user/SendEmail.jtp?type=node&amp;node=4912226&amp;i=0" target="_top">[hidden email]</a>&gt; wrote:<o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.5pt;padding:0in 0in 0in 12.0pt;margin-top:5.0pt;margin-bottom:5.0pt'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Hi Roger!&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:"Calibri","sans-serif";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:"Calibri","sans-serif";color:#1F497D'>That was a nice try!</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><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;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<o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>[Ron Teitelbaum]</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";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.</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Try creating drawRed, drawYellow, drawGreen, and drawBlue methods</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>For example</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>drawRed</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; drawColor := Color red.</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Now add to your menu properly.</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><span class=im>aCustomMenu add: 'clear' action: #clear.</span><br><span class=im>aCustomMenu add: 'red' action: #drawRed.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";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)</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Do that with all your colors and you should be all set!</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";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.</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>All the best,</span></i></b><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";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><o:p></o:p></p></div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>The initial color is black.<o:p></o:p></p></div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>When i click the command &quot;change color&quot; 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='mso-margin-top-alt:auto;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 style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>Thank you in advance.<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><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'>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">[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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> 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 &quot;color&quot; and &quot;size&quot; commands as &quot;clear&quot; command in the custom menu code. After that, add &quot;color&quot; and &quot;size&quot; 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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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">[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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Calibri","sans-serif";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:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> <a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=2" target="_top">[hidden email]</a> [mailto:<a href="/user/SendEmail.jtp?type=node&amp;node=4912223&amp;i=3" target="_top">[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 &quot;Clear&quot; 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'>&quot;Methods&quot;<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'>&quot;Class PaintMorph&quot;<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'>&quot;Workspace&quot;<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">[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">[hidden email]</a>&gt; wrote:<o:p></o:p></p></div></div><blockquote style='border:none;border-left:solid #CCCCCC 1.5pt;padding:0in 0in 0in 12.0pt;margin-top:5.0pt;margin-bottom:5.0pt'><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">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">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">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">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">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">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=9" target="_top">[hidden email]</a><br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">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><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=10" target="_top">[hidden email]</a> <br><a href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_top">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br><br><o:p></o:p></p><div class=MsoNormal align=center style='text-align:center'><hr size=1 width="100%" noshade style='color:#CCCCCC' align=center></div><div><div><p class=MsoNormal><b><span style='font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444'>If you reply to this email, your message will be added to the discussion below:<o:p></o:p></span></b></p></div><p class=MsoNormal><span style='font-size:9.0pt;font-family:"Tahoma","sans-serif";color:#444444'><a href="http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html" target="_top">http://forum.world.st/Project-on-squeak-language-tp4912035p4912223.html</a> <o:p></o:p></span></p></div><div style='margin-top:4.8pt'><p class=MsoNormal style='line-height:18.0pt'><span style='font-size:8.5pt;font-family:"Tahoma","sans-serif";color:#666666'>To start a new topic under Squeak - Beginners, email <a href="/user/SendEmail.jtp?type=node&amp;node=4912226&amp;i=1" target="_top">[hidden email]</a> <br>To unsubscribe from Squeak - Beginners, <a href="" target="_top">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" target="_top"><span style='font-size:7.0pt;font-family:"Times New Roman","serif"'>NAML</span></a> <o:p></o:p></span></p></div></div></blockquote><p class=MsoNormal><o:p>&nbsp;</o:p></p><div class=MsoNormal><hr size=3 width=300 style='width:2.5in' align=left></div><p class=MsoNormal>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.<o:p></o:p></p></div></body></html>