logo       

Re: Obsolete classes - I can find pointers to them, but how to get rid of t: msg#00043

lang.smalltalk.squeak.beginners

Subject: Re: Obsolete classes - I can find pointers to them, but how to get rid of them

Michael Davies wrote:
> Ramon Leon posted a useful utility that attempts to clean up a variety
> of common problems in an image:
> http://onsmalltalk.com/programming/smalltalk/squeak-smalltalk-image-maintenance/
>
> If this doesn't help, at least you know that it's not a simple problem!
> _______________________________________________
> Beginners mailing list
> Beginners@xxxxxxxxxxxxxxxxxxxxxxxxxx
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
>
This is some code from MC1.5 which I think is the most comprehensive
attempt to rehome obsolete instances.

this comes with extensive disclaimers

Keith

------


fixAllObsoleteReferences
"
self fixAllObsoleteReferences
"
(SystemNavigation default obsoleteBehaviors select: [ :c | c isMeta not ])
do: [ :obsClass |

([obsClass nonObsoleteClass] ifError: [ nil]) ifNotNilDo:
[ :actualClass |

actualClass updateInstancesFrom: obsClass.
obsClass becomeForward: actualClass.

([obsClass metaclass] ifError:[nil]) ifNotNilDo:
[:metaClass |
metaClass becomeForward: actualClass class ]]].

SmalltalkImage current fixObsoleteReferences


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise