[Newbies] before methods

Sean Allen sean at monkeysnatchbanana.com
Mon Oct 13 20:51:17 UTC 2008


On Oct 12, 2008, at 12:13 PM, Matthew Fulmer wrote:

> yes. Make a subclass.
>
> overriddenMethod
>    Transcript show: 'This is the before aspect'; cr.
>    super overriddenMethod
>    Transcript show: 'This is the after aspect'; cr.

should have been more clear on that.

want to go in the opposite direction.

with CLOS before methods you can do something like this.

base...

before x
x

before x does foo
x does nothing

child

implements x

child b

implements x

both children get the before x functionality run before their x  
without having to explicitly call.



More information about the Beginners mailing list