[newbie question] critical sections
Alan Lovejoy
sourcery at pacbell.net
Thu Jul 15 07:44:53 UTC 1999
> ** Original Sender: Peter Novak <pno at whitestein.com>
> Bob Arning wrote:
> >
> > A more specific example would help here (privately, perhaps, given the current level of discussion on the list).
>
> Okay. Exactly I tried to add a class X. It's superclass was Dictionary
> and one of
> its subclasses was SystemDictionary. Class SystemDictionary automaticaly
> recompiles
> when I try to change its superclass. Everything could be okay, but class
> X had defined
> method at: ifAbsent: which is used by Smalltalk (uses at: ifAbsent: from
> class
> Dictionary). This is my problem and reason for searching for someone who
> os able
> to solve my problem faster than me ;).
>
> peter.
If you evaluate the following doIts in order, the class PoolDictionary will be
inserted between Dictionary and SystemDictionary (works in my image, anyway):
The class "PoolDictionary" should either not yet exist, or else have no methods:
Dictionary subclass: #PoolDictionary
instanceVariableNames: ''
classVariableNames: ''
poolDictionaries: ''
category: 'System-Support'.
PoolDictionary subclass: #SystemDictionary
instanceVariableNames: ''
classVariableNames: 'CachedClassNames LastImageName LastQuitLogPosition
LowSpaceProcess LowSpaceSemaphore ShutDownList SpecialSelectors
StartUpList SystemChanges '
poolDictionaries: ''
category: 'System-Support'.
Then you can add methods to PoolDictionary (or whatever name you want to use
for this class). But as always when changing critical classes such as SystemDictionary:
Danger, Will Robinson! Be careful. Save early, and often.
--Alan
Download Neoplanet at http://www.neoplanet.com
More information about the Squeak-dev
mailing list
|