[V3dot10] [Q] Removing obsolete Players on a crowded image
Klaus D. Witzel
klaus.witzel at cobss.com
Mon Jan 22 14:50:02 UTC 2007
Hi Edgar,
on Mon, 22 Jan 2007 14:36:46 +0100, you wrote:
> I try my removal on a Squeak3.9b-7051, what I have full of odd things.
>
> Wish test the attached , as if possible people could actualize image
> without loading a new one.
>
> The procedure fails if you have Undeclared into your image, what I bet
> my 2
> cents of peso you have.
>
> You could do Smalltalk at:# Undeclared put: Dictionary new for fooling.
> But if you have Players , the removing of obsoletes do not complete.
>
> I do the following what works
>
> !TPureBehavior methodsFor: 'initialization' stamp: 'edc 1/22/2007 10:14'
> prior: 45049134!
> obsolete
> "Invalidate and recycle local methods,
> e.g., zap the method dictionary if can be done safely."
> self canZapMethodDictionary
> ifTrue: [self methodDict: self emptyMethodDictionary].
> self superclass = Player ifTrue:[^self] .
You lost me. Neither Model nor Player answer #hasTraitComposition with
true. How can so a[n immediate] subclass of Player, who's doing the #uses:
for subclasses of Player?
> self hasTraitComposition ifTrue: [
> self traitComposition traits do: [:each |
> each removeUser: self]]
>
> Things like this populate all Squeak ....
But Player is "just" referenced in morphics, not outside of it (i.e. not
in Traits). Please explain, thank you.
/Klaus
> Now, how the best code looks ? I wish learn.
>
> Edgar
>
More information about the V3dot10
mailing list