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. <br><br>
<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>&gt; 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 &quot;Float pi&quot; that it is held in a class variable that is initialized in the initialize method. Isn&#39;t it the case that the initialize method is only called if a Float object is created? Also, isn&#39;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&#39;t be sure it was set and I&#39;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>