We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Welcome to the Technical wiki!
This is a scratchpad area to develop articles and documents which will later be moved to the repository.
from: https://wiki.squeak.org/squeak/1145
About creating a subclass of ColoredBoxMorph and overriding the method #drawOn:
!classDefinition: #CrossMorph category: 'MorphSubclassDemo'! ColoredBoxMorph subclass: #CrossMorph instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'MorphSubclassDemo'! !CrossMorph methodsFor: 'as yet unclassified' stamp: 'hjh 5/13/2025 20:30:00'! drawOn: aCanvas | crossHeight crossWidth horizontalBar verticalBar | crossHeight := self morphHeight / 3.0 . crossWidth := self morphWidth / 3.0 . horizontalBar := self localBounds insetBy: 0 @ crossHeight. verticalBar := self localBounds insetBy: crossWidth @ 0. aCanvas fillRectangle: horizontalBar color: self color. aCanvas fillRectangle: verticalBar color: self color! !