[Q][traits] meaning of super

Martin Drautzburg martin.drautzburg at web.de
Sat Sep 6 18:22:51 UTC 2003


In a Trait I define the following method:

mouseDown: evt 
	evt shiftPressed not & evt yellowButtonPressed
		ifTrue: [^ self invokeMenu: evt].
	evt shiftPressed not & evt redButtonPressed
		ifTrue: [self selectWithOwners].
	super mouseDown: evt

When this method is invoked, where does the super search start. Is it
super relative to the invkoker or super relative to the trait class ?

The strange thing is that super mouseDown: fails right after the Trait
has been added to somClass

MessageNotUnderstood: MtTrait>>MouseDown

When I accept the method in the Trait again things seem to work.



More information about the Squeak-dev mailing list