Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!apple!netcom!cooper From: cooper@netcom.UUCP (Ken Cooper) Newsgroups: comp.lang.smalltalk Subject: Re: ST V/286 bl... globals Message-ID: <4807@netcom.UUCP> Date: 2 Dec 89 06:59:14 GMT References: <453@DB0TUI11.BITNET> Reply-To: cooper@netcom.UUCP (Ken Cooper) Organization: NetCom- The Bay Area's Public Access Unix System {408 997-9175 guest} Lines: 31 In article <453@DB0TUI11.BITNET> MUHRTH@DB0TUI11.BITNET (Thomas Muhr) writes: >How can I recover from a system state which I have produced by >mistakenly creating a Smalltalk at:xxxx variable which formerly pointed >to a Class!. One way of accomplishing this is to get ahold of the class, reinstall it in Smalltalk, then remove it with a ClassHierarchyBrowser. The only trick is getting ahold of the class. One way to do so is to get it out of a global array called TableOfClasses, which is an *ugly* data structure containing both classes and integer values (the integers are pointers to the next free slot in the array). Here's a bit of code that will do what you want: TableOfClasses do: [ :class | ((class isKindOf: Behavior) and: [ class name = 'Junk' ]) ifTrue: [ Smalltalk at: #Junk put: class. ]. ] This works on both Smalltalk/V 286 and Smalltalk/V Mac. Hope this helps, Ken ============================================================================= Ken Cooper USENET: cooper@netcom.uucp Acumen Software Compu$erve: 71571,407 =============================================================================