Assignments to nil...

goran.krampe at bluefish.se goran.krampe at bluefish.se
Mon Sep 22 13:30:06 UTC 2003


I was just looking around, finding a double initialization (FIX has been
posted) when I saw this method:

PluggableButtonMorph>>initialize
	"initialize the state of the receiver"
	super initialize.
	""
	self listDirection: #topToBottom.
	self hResizing: #shrinkWrap.
	"<--so naked buttons work right"
	self vResizing: #shrinkWrap.
	self wrapCentering: #center;
		 cellPositioning: #topCenter.
	model _ nil.
	label _ nil.
	getStateSelector _ nil.
	actionSelector _ nil.
	getLabelSelector _ nil.
	getMenuSelector _ nil.
	shortcutCharacter _ nil.
	askBeforeChanging _ false.
	triggerOnMouseDown _ false.
	onColor _ self color darker.
	offColor _ self color.
	feedbackColor _ Color red.
	showSelectionFeedback _ false.
	allButtons _ nil.
	argumentsProvider _ nil.
	argumentsSelector _ nil.
	self extent: 20 @ 15

Now, my question: Is there any to me yet unknown good reason for having
all these "yaddayadda _ nil" in this method?

It is an #initialize method which AFAIK is only called upon creation. So
the instvars are already set to nil.

Just wondering if I have missed anything...

regards, Göran



More information about the Squeak-dev mailing list