getting rid of anObsoleteOBNotifier
Jeff Sparkes
JSparkes at databeacon.com
Fri Oct 22 19:19:48 UTC 2004
> No, OBNotifier was my attempt at a simple way to handle updating the
> browser when the system is changed by something other than that browser.
> It had nothing to do with OBNotification.
I said it was a guess :-)
>> The best solution I found was to explore "Smalltalk obsoleteClasses".
>> It turns out that anObsoleteNotifier was at: 29, so I did "(Smalltalk obsoleteClasses
>> at: 29) becomeForward: OBNotification class", which seems to have done the trick.
> I'm surprised this hasn't caused you any problems. If you find yourself
> in this situation again, the best way to fix it is to send #unregister
> to the instance of OBNotifier. For this image, I think you want
> something like the following. I don't have a Squeak image handy, so I
> can't check this code...
> SystemChangeNotifier uniqueInstance noMoreNotificationsFor:
> theObsoleteOBNotifer.
(Smalltalk obsoleteClasses at: 29) allInstances do: [:i | SystemChangeNotifier uniqueInstance noMoreNotificationsFor: i].
did the job.
I don't think you can access obsolete classes by name.
>> Is this a general technique to use after renaming classes?
> In general, you shouldn't need to do this kind of thing. Renaming a
> class should "just work." (Although this was a case of removing a
> class.) This was a pretty ugly hack that I didn't clean up properly when
> I took it out. I'll add the clean up code to the OB installer.
Thanks for the heads up,
Colin
More information about the Squeak-dev
mailing list
|