[BUG] Can't create new class in isolated project - [FIX]

Dan Ingalls Dan.Ingalls at disney.com
Tue Apr 25 03:04:28 UTC 2000


"Mark A. Schwenk" <mas at wellthot.com> and others reported...
>With a Squeak 2.8a update 2005 system, I created a Morphic Project, entered that project, and then chose "changes..." -> "isolate changes of this project" from the world menu. I then opened a browser, created a new class, and received a walkback
>	MethodNotUnderstood: methodDict

My apologies, folks.  This was incredibly simple, and I just didn't get to it until after the day went by.  In fact the problem was that I left a changeSet out of the recent updates.  Here's a copy below, and I'll also include it (honest ;-) in the next set of updates.

	- Dan
---------------------------
'From Squeak2.8alpha of 12 January 2000 [latest update: #1984] on 5 April 2000 at 8:13:16 am'!
"Change Set:		ModProjClassHack
Date:			5 April 2000
Author:			Dan Ingalls

Prefatory to putting new classes into local environments, classes added in isolated projects must not be revoked upon exit.  This hack accomplishes this, at the cost of added classes not being local to the project.
"!


!ClassChangeRecord methodsFor: 'all changes' stamp: 'di 4/5/2000 08:05'!
noteChangeType: changeSymbol fromClass: class

	(changeSymbol = #new or: [changeSymbol = #add]) ifTrue:
		[changeTypes add: #add.
		changeTypes remove: #change ifAbsent: [].
		revertable _ false.
		^ self].
	changeSymbol = #change ifTrue:
		[(changeTypes includes: #add) ifTrue: [^ self].
		^ changeTypes add: changeSymbol].
	changeSymbol = #comment ifTrue:
		[^ changeTypes add: changeSymbol].
	changeSymbol = #reorganize ifTrue:
		[^ changeTypes add: changeSymbol].
	changeSymbol = #rename ifTrue:
		[^ changeTypes add: changeSymbol].
	(changeSymbol beginsWith: 'oldName: ') ifTrue:
		["Must only be used when assimilating other changeSets"
		(changeTypes includes: #add) ifTrue: [^ self].
		priorName _ changeSymbol copyFrom: 'oldName: ' size + 1 to: changeSymbol size.
		^ changeTypes add: #rename].
	changeSymbol = #remove ifTrue:
		[(changeTypes includes: #add)
			ifTrue: [changeTypes add: #addedThenRemoved]
			ifFalse: [changeTypes add: #remove].
		^ changeTypes removeAllFoundIn: #(add change comment reorganize)].

	self error: 'Unrecognized changeType'! !

!ClassChangeRecord methodsFor: 'initialization' stamp: 'di 4/5/2000 08:11'!
initFor: className revertable: isRevertable

	inForce _ isRevertable.
	changeTypes _ IdentitySet new.
	methodChanges _ IdentityDictionary new.
	priorName _ thisName _ className.
	revertable _ isRevertable and: [self realClass notNil].
	revertable ifTrue:
		[priorMD _ self realClass methodDict copy.
		priorOrganization _ self realClass organization deepCopy].
! !







More information about the Squeak-dev mailing list