[Pharo-project] ChangeSet element has nil protocol

Stéphane Ducasse stephane.ducasse at inria.fr
Sat Sep 17 06:19:47 EDT 2011


I guess I found it

	changedMessageList
	"Used by a message set browser to access the list view information."

	| messageList |
	messageList := OrderedCollection new.
	changeRecords associationsDo: [:clAssoc | | classNameInParts classNameInFull |
		classNameInFull := clAssoc key asString.
		classNameInParts := classNameInFull findTokens: ' '.

		(clAssoc value allChangeTypes includes: #comment) ifTrue:
			[messageList add:
				(SourcedMethodReference new
					setClassSymbol: classNameInParts first asSymbol
					classIsMeta: false 
					methodSymbol: #Comment 
					stringVersion: classNameInFull, ' Comment')].

		clAssoc value methodChangeTypes associationsDo: [:mAssoc |
			(#(remove addedThenRemoved) includes: mAssoc value) ifFalse:
				[self halt.
				
				messageList add:
					(SourcedMethodReference new
						setClassSymbol: classNameInParts first asSymbol
						classIsMeta: classNameInParts size > 1 
						methodSymbol: mAssoc key 
						stringVersion: classNameInFull, ' ' , mAssoc key)]]].

									^^^^^^^^^^^^^
	^ messageList asArray sort


versus

changedMessageList
	"Used by a message set browser to access the list view information."

	| messageList |
	messageList := OrderedCollection new.
	changeRecords associationsDo: [:clAssoc | | classNameInParts classNameInFull |
		classNameInFull := clAssoc key asString.
		classNameInParts := classNameInFull findTokens: ' '.

		(clAssoc value allChangeTypes includes: #comment) ifTrue:
			[messageList add:
				(RGCommentDefinition new
					parentName: clAssoc key asSymbol)].

		clAssoc value methodChangeTypes associationsDo: [:mAssoc |
			(#(remove addedThenRemoved) includes: mAssoc value) ifFalse:
				[self halt.
				messageList add:
					((RGMethodDefinition named: mAssoc key)
						parentName: clAssoc key asSymbol;
						isMetaSide: (classNameInParts size > 1))]]].
					^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

	^ messageList asArray sort








More information about the Pharo-dev mailing list