<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Sep 29, 2008, at 6:00 AM, Marcin Tustin wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">The initialize method on the class side will be called only when *the class* is initialised. You are thinking of the instance-side initialize method which is called each time you create an instance. </blockquote><div><br></div><div>Wow. I wasn't aware that there was both a class and instance initialize method. Thanks for explaining that!</div><div><br></div><div>What causes the class initialize method to be invoked ... and reinvoked after I change it?</div><br><blockquote type="cite"><div><span class="gmail_quote">On 9/29/08, <b class="gmail_sendername">Mark Volkmann</b> &lt;<a href="mailto:mark@ociweb.com">mark@ociweb.com</a>> wrote:</span> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span class="q">On Sep 28, 2008, at 11:32 PM, K. K. Subramaniam wrote:<br><br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Sunday 28 Sep 2008 7:26:43 pm Mark Volkmann wrote:<br> <blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">I think my main issue is scoping. I want to define a constant that is<br>associated with a class to avoid name conflicts.<br> </blockquote>See classes Color, Cursor or Float for examples of scoped constants:<br>&nbsp;Color red<br>&nbsp;Cursor wait<br>&nbsp;Float pi<br><br>For constants that should be exposed to a few (but not all) classes, use pool<br>dictionaries.<br> </blockquote><br></span>Thanks! This brings up another question. Where is a good place to initialize a constant? I see in the case of "Float pi" that it is held in a class variable that is initialized in the initialize method. Isn't it the case that the initialize method is only called if a Float object is created? Also, isn't it called every time a Float object is created? It seems that would mean if I followed that pattern for one of my own constants then I wouldn't be sure it was set and I'd pay the cost of setting it many times.<br> <br>---<br><span class="sg">Mark Volkmann</span> <div><span class="e" id="q_11cadbe8ea6c69b9_3"><br><br><br><br><br>_______________________________________________<br>Beginners mailing list<br><a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:Beginners@lists.squeakfoundation.org" target="_blank">Beginners@lists.squeakfoundation.org</a><br> <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.squeakfoundation.org/mailman/listinfo/beginners" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/beginners</a><br></span></div> </blockquote></div><br> _______________________________________________<br>Beginners mailing list<br><a href="mailto:Beginners@lists.squeakfoundation.org">Beginners@lists.squeakfoundation.org</a><br>http://lists.squeakfoundation.org/mailman/listinfo/beginners<br></blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Arial; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="Apple-interchange-newline">---</div><div>Mark Volkmann</div><div><br class="webkit-block-placeholder"></div></div></span><br class="Apple-interchange-newline"></span><br class="Apple-interchange-newline"> </div><br></body></html>