[squeak-dev] Removing a Preference

Chris Cunningham cunningham.cb at gmail.com
Mon Jul 29 16:09:33 UTC 2013


I don't/didn't think that #initialize was called on a package load unless
the class was a new class - so that it wouldn't overwrite accumulated state
since the initial load.  Isn't that still the case?

worth testing in any case.


On Mon, Jul 29, 2013 at 8:45 AM, Frank Shearar <frank.shearar at gmail.com>wrote:

> My Inbox submission opted for an explicit source-based removal of the
> preference, in Preferences class >> #initialize. (Inspired by Colin
> Putney's method of uninstalling/reinstalling Environments, but don't
> blame him for my work!)
>
> frank
>
> On 29 July 2013 16:19, Chris Cunningham <cunningham.cb at gmail.com> wrote:
> > Would this post-script need to be in a configuration file?  One of those
> > packages that is guaranteed to load?  Otherwise, once you have a second
> > version of that package,the post-script won't run, correct?
> >
> > How does Trunk and Post/Pre scripts work anyways?  Mainly just curious.
> >
> > -Chris (one of the other ones)
> >
> >
> > On Sat, Jul 27, 2013 at 12:48 PM, Frank Shearar <frank.shearar at gmail.com
> >
> > wrote:
> >>
> >> Yes, it's more the "where should I put the #removeKey: when I remove
> >> the preference" than "hi I am a newbie and don't know the Dictionary
> >> API" :)
> >>
> >> Yes, ok, ah postscript could do the trick. I can't think of a better
> >> way of doing it, and it is an inherently state-changing thing.
> >>
> >> frank
> >>
> >> On 27 July 2013 19:28, Chris Muller <asqueaker at gmail.com> wrote:
> >> > I don't mean to be a smart-alec but...   removeKey: ?  :)
> >> >
> >> > No, seriously, are you asking where to put the removeKey:?  Perhaps in
> >> > the MC post-script of that package-version?
> >> >
> >> > On Fri, Jul 26, 2013 at 12:56 PM, Frank Shearar
> >> > <frank.shearar at gmail.com> wrote:
> >> >> As part of the MonticellConfiguration <--> System untangling, I'm
> >> >> converting the #updateFromServerAtStartup preference to a
> >> >> PragmaPreference. Making the new preference is easy. But the
> >> >> preference itself is stored inside Preferences' vast Dictionary of
> >> >> preferences. It seems lame to just leave the key there. So what's the
> >> >> proper way to remove the old preference?
> >> >>
> >> >> frank
> >> >>
> >> >
> >>
> >
> >
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20130729/058e6453/attachment.htm


More information about the Squeak-dev mailing list