Bug in Dynamic Protocols?

Damien Cassou damien.cassou at gmail.com
Tue Oct 16 05:14:34 UTC 2007


Hi Michael

2007/10/15, Michael Fremont <fremontmj at gmail.com>:
> I have now downloaded the same image you're using.  I make no changes
> to it whatsoever.  Doing 'SystemNavigation default obsoleteClasses'
> returns an empty array.
>
> Then I make a new class 'Test'.  I delete it by doing: 'Test
> removeFromSystemUnlogged' in a workspace.


How do you want DynamicProtocols to update its cache if you explicitly
say «remove this silently»? Please send #removeFromSystem instead and
DynamicProtocols will be notified.


> Now 'SystemNavigation default obsoleteClasses' returns (AnObsoleteTest).
>
> Using PointerFinder I see that DPRecentlyModified's cache is holding a
> reference to the deleted class.
>
> Perhaps the problem is I'm not deleting the class through the browser?


You can bypass the browser, but you must use the notification system.


> I also noticed that turning off dynamicProtocolActivation in the
> Preference Browser doesn't make a difference;


It depends when you deactivate them. If you deactivate them in the
begining, their cache should not be updated. If you deactivate them
after having removed the class, it doesn't change anything.

> and if I make a method
> with 'self halt' in it, the OB shows a red flag for that method, even
> though I turned off BOTH dynamicProtocolActivation AND Debugging.


The red flag is not part of the dynamicprotocols. It's a feature of
the OmniBrowser.


> Very strange.

I hope things get clearer now.

-- 
Damien Cassou


More information about the Squeak-dev mailing list