[ENH] Switch

Matej Kosik kosik at decef.elf.stuba.sk
Thu Jan 29 13:18:13 UTC 2004


My application used Switch model. I have noticed that this simple
thing when it is asked to print out itself reports something like

	a Switch

The attached changeset ensures that the switch prints itself out
as

	ON-Switch
or
	OFF-Switch

This new string appears on the Transcript showing the Switch,
also when you 'print it' and also in Explorer.

I think that this is reasonable behavior.
-- 
Matej Kosik <http://altair.dcs.elf.stuba.sk/wiki/Kosik/Main>
-------------- next part --------------
'From Squeak3.4 of 1 March 2003 [latest update: #5170] on 27 January 2004 at 5:49:46 pm'!

!Switch methodsFor: 'converting' stamp: 'mk 1/27/2004 17:48'!
printOn: aStream
	self isOn
		ifTrue: [aStream nextPutAll: 'ON-Switch']
		ifFalse: [aStream nextPutAll: 'OFF-Switch']! !


More information about the Squeak-dev mailing list