<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<font face="Georgia">One problem here is that there are at least
kinds of things in #initialize methods:<br>
<br>
- things that must be set/reset for the system to work, like a new
class var or an old one with new meaning<br>
- things that the user might like to reset to get back to some
pristine starting point<br>
<br>
This update contained one example of the former:<br>
"update the uiProcess instance variable in all Morphic
projects"<br>
self allSubInstances do: [:p | p uiProcess].<br>
<br>
mingled in with various examples of the latter and all got done
together. It has been convenient to rely on the auto-running of a
changed class initialization method to accomplish necessary state
changes, but, as we see, that includes unpleasant side-effects. If
you want the class #initialize method to be the place the user
goes for a clean reset, then the solution might be to<br>
<br>
- disable auto-running class #initialize methods simply because
they changed<br>
- add a new class method #autoInitialize which *will* be run if
changed<br>
- make your changes solely to #initialize if it's simply something
to be available if the user ever needs it<br>
- add your code to both methods if you want it to run as soon as
it's loaded and be available for later<br>
- whenever you update #autoInitialize, remove older stuff that
does not need to be run a second time<br>
<br>
Cheers,<br>
Bob<br>
<br>
</font>
<div class="moz-cite-prefix">On 9/11/13 3:04 PM, tim Rowledge wrote:<br>
</div>
<blockquote
cite="mid:198516DD-20E1-4D06-9F8B-BFCB86532A25@rowledge.org"
type="cite">
<pre wrap="">
On 11-09-2013, at 11:58 AM, Bob Arning <a class="moz-txt-link-rfc2396E" href="mailto:arning315@comcast.net"><arning315@comcast.net></a> wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Well, since the whole point of this snippet is to change your project's background, I'd say you simply want to delete it. Then you can rely on whatever you do in release building to set the background for the standard image and everybody else keeps their background as-is.
</pre>
</blockquote>
<pre wrap="">
It seems to me that the pattern ought to be along the lines of
if user has set a specific preference, leave things alone
if not, reset the default
if that requires a redisplay/explosion/descent-down-the-rabbit-hole, do it.
tim
--
tim Rowledge; <a class="moz-txt-link-abbreviated" href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a class="moz-txt-link-freetext" href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a>
Strange OpCodes: DNPG: Do Not Pass Go
</pre>
</blockquote>
<br>
</body>
</html>