View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide

PluggableButtonMorph

Selectors/aspects: state and action
	-	Am I on or off?
	-	Here's what you should do when I get clicked.


Example: Browser buildMorphicSwitches
	...
	instanceSwitch := PluggableButtonMorph
		on: self
		getState: #instanceMessagesIndicated
		action: #indicateInstanceMessages.
	instanceSwitch
		label: 'instance';
		askBeforeChanging: true;
		borderWidth: 0.
	...


        Changes propagation:
        self changed: #instanceMessagesIndicated

Další příklady viz http://minnow.cc.gatech.edu/squeak/2962


Link to this Page