<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<p>Hi Stephen,</p>
<p>You can see if mapBy: is a defined method name by selecting it and right clicking and choosing 'implementers'</p>
<p>Also, when your code pops up the error, you should be able to expand the stack on the error's outliner, and play around with it. My guess is that 'data copy' is returning nil, or some other object which doesn't understand mapBy:  You should be able to get an outliner of it and see for yourself what object it is.</p>
<p>Try clicking things which are raised like buttons, or small triangles which look like they might expand and see how you go :)</p>
<p><br />Russell</p>
<p> </p>
<p> </p>
<p>On 2014-03-07 03:38, Stephen De Gabrielle wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px"><!-- html ignored --><!-- head ignored --><!-- meta ignored --><span style="display: none;"> </span><!-- node type 8 -->
<div id="ygrp-mlmsg" style="position: relative;">
<div id="ygrp-msg" style="z-index: 1;"><!-- node type 8 -->
<div id="ygrp-text"><!-- node type 8 --> <span style="font-weight: bold; font-size: 12px; display: block; margin-bottom: 20px;">[<a style="text-decoration: none;" href="#TopText">Attachment(s)</a> from Stephen De Gabrielle included below]</span> <!-- node type 8 -->
<p> </p>
<div dir="ltr">Hi, 
<div> </div>
<div>I was working through the pie-chart tutorial in the main repository at</div>
<div><span style="font-weight: bold; color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"><span><a style="color: #4183c4; text-decoration: none;" href="https://github.com/russellallen/self/tree/5e8031667b5d549d4b4a6cec41e06aa97c3c9c45"><span>self</span></a></span></span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"> / </span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"><a style="color: #4183c4; text-decoration: none;" href="https://github.com/russellallen/self/tree/5e8031667b5d549d4b4a6cec41e06aa97c3c9c45/docs"><span>docs</span></a></span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"> / </span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"><a style="color: #4183c4; text-decoration: none;" href="https://github.com/russellallen/self/tree/5e8031667b5d549d4b4a6cec41e06aa97c3c9c45/docs/tutorial"><span>tutorial</span></a></span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"> / </span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"><a style="color: #4183c4; text-decoration: none;" href="https://github.com/russellallen/self/tree/5e8031667b5d549d4b4a6cec41e06aa97c3c9c45/docs/tutorial/Morphic"><span>Morphic</span></a></span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"> / </span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"><a style="color: #4183c4; text-decoration: none;" href="https://github.com/russellallen/self/tree/5e8031667b5d549d4b4a6cec41e06aa97c3c9c45/docs/tutorial/Morphic/PieChart"><span>PieChart</span></a></span><span style="color: #999999; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;"> / </span><strong style="color: #000000; font-family: Helvetica,arial,freesans,clean,sans-serif; font-size: 18px;">Changes.html</strong></div>
<div>
<div>I think I did everything right but I am getting an error </div>
<div>'Lookup error, 'mapBy:' not found'</div>
<div> </div>
<div>I believe this is a valid selector, but I am only just starting with the language </div>
<div>this is the 'copyNewData: data'' slot' text</div>
<div>
<blockquote class="gmail_quote" style="border-left-width: 1px; border-left-color: #cccccc; border-left-style: solid;">| new. wList |<br />new: copyRemoveAllMorphs.<br />wList:<br />        data copy mapBy: [| :val. w |<br />                w: pieWedgeMorph copyRemoveAllMorphs.<br />                w color: paint copyRandom.<br />                w amount: val.<br />         ].<br />new addAllMorphs: wList.<br />new</blockquote>
</div>
<div> </div>
<div>I  checked the handbook, mapBy: is a valid selector <a href="http://handbook.selflanguage.org/4.5/usefulselectors.html">http://handbook.selflanguage.org/4.5/usefulselectors.html</a></div>
<div> </div>
<div>Any ideas where I have gone wrong?</div>
<div> </div>
<div>Kind regards, </div>
<div> </div>
<div>Stephen</div>
<div> </div>
<div> </div>
<div> </div>
<div>--<br />Stephen De Gabrielle</div>
</div>
</div>
</div>
<!-- node type 8 -->
<div style="color: #fff; height: 0px;"></div>
<!-- node type 8 --><!-- node type 8 --><!-- head ignored --><!-- meta ignored --><!-- node type 8 --><!-- node type 8 --></blockquote>
<p> </p>
<div> </div>
</body></html>