[squeak-dev] Something in the update process damages the
background
Bob Arning
arning315 at comcast.net
Wed Sep 11 19:30:47 UTC 2013
One problem here is that there are at least kinds of things in
#initialize methods:
- things that must be set/reset for the system to work, like a new class
var or an old one with new meaning
- things that the user might like to reset to get back to some pristine
starting point
This update contained one example of the former:
"update the uiProcess instance variable in all Morphic projects"
self allSubInstances do: [:p | p uiProcess].
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
- disable auto-running class #initialize methods simply because they changed
- add a new class method #autoInitialize which *will* be run if changed
- make your changes solely to #initialize if it's simply something to be
available if the user ever needs it
- add your code to both methods if you want it to run as soon as it's
loaded and be available for later
- whenever you update #autoInitialize, remove older stuff that does not
need to be run a second time
Cheers,
Bob
On 9/11/13 3:04 PM, tim Rowledge wrote:
> On 11-09-2013, at 11:58 AM, Bob Arning <arning315 at comcast.net> wrote:
>
>> 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.
> 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; tim at rowledge.org; http://www.rowledge.org/tim
> Strange OpCodes: DNPG: Do Not Pass Go
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130911/7096e409/attachment-0001.htm
More information about the Squeak-dev
mailing list
|