Skip to content
Permalink
Browse files

- remove #removingFrom: as we do not support that anymore with the ne…

…w classbuilder. Update comment Accessor Slot example
  • Loading branch information
MarcusDenker committed Mar 27, 2019
1 parent 302d676 commit 4f2ffae3604b7f7e505bf152e1a718542e67c8d3
Showing with 1 addition and 14 deletions.
  1. +0 −5 src/Slot-Core/Slot.class.st
  2. +1 −9 src/Slot-Examples/AccessorInstanceVariableSlot.class.st
@@ -365,11 +365,6 @@ Slot >> removeProperty: propName ifAbsent: aBlock [
^ property
]

{ #category : #'class building' }
Slot >> removingFrom: aClass [
"I am called by the class builder. This way a Slot can change the class it is installed in"
]

{ #category : #accessing }
Slot >> scope: aScope [
"ignored, subclasses can override to analyze the scope they are to be installed in"
@@ -1,7 +1,7 @@
"
NOTE: this is an example of what can be done with Slots. It is *not* an example of what *should* be done with Slots.
I am a slot that compiles accessor methods in the Class that it is installes in. When the slot is removed, the accessors are removed, too.
I am a slot that compiles accessor methods in the Class that it is installes in.
This example shows how Slots can change the class that they are part of.
"
@@ -33,11 +33,3 @@ AccessorInstanceVariableSlot >> installingIn: aClass [
aClass compile: reader classified: 'accessing'.
aClass compile: writer classified: 'accessing'.
]

{ #category : #'class building' }
AccessorInstanceVariableSlot >> removingFrom: aClass [

aClass removeSelector: self name.
aClass removeSelector: self name asMutator.

]

0 comments on commit 4f2ffae

Please sign in to comment.
You can’t perform that action at this time.