Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
6
Task/Delegates/Smalltalk/delegates-1.st
Normal file
6
Task/Delegates/Smalltalk/delegates-1.st
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Object
|
||||
subclass:#Thingy
|
||||
instanceVariableNames:''
|
||||
|
||||
thing
|
||||
^ 'thingy implementation'
|
||||
10
Task/Delegates/Smalltalk/delegates-2.st
Normal file
10
Task/Delegates/Smalltalk/delegates-2.st
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
Object
|
||||
subclass:#Delegator
|
||||
instanceVariableNames:'delegate'
|
||||
|
||||
delegate:something
|
||||
delegate := something
|
||||
|
||||
operation
|
||||
^ delegate
|
||||
perform:#thing ifNotUnderstood:'default implementation'.
|
||||
8
Task/Delegates/Smalltalk/delegates-3.st
Normal file
8
Task/Delegates/Smalltalk/delegates-3.st
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
|d|
|
||||
d := Delegator new.
|
||||
d operation.
|
||||
-> 'default implementation'
|
||||
|
||||
d delegate:(Thingy new).
|
||||
d operation.
|
||||
-> 'thingy implementation'
|
||||
Loading…
Add table
Add a link
Reference in a new issue