Hi Dario, Have you defined those methods in the class side? a) propertyAt: aKey ifAbsent: aBlock
^ self properties at: aKey ifAbsent: aBlock b) propertyAt: aKey ifAbsentPut: aBlock ^ self properties at: aKey ifAbsentPut: aBlock c) propertyAt: aKey put: aValue ^ self properties at: aKey put: aValue
I will let Marcus answer more properly but I think you should rename those methods to not collapse with the behaviour in the base class... On Wed, Jul 4, 2018 at 8:16 PM dario.trussardi@tiscali.it < dario.trussardi@tiscali.it> wrote:
I wrong.......
the error is relative to my root class ...
For this class i implemented the class method
propertyAt: aKey ifAbsent: aBlock
This is in conflict with :
the Behavior originalName method implement:
^ (( self isObsolete and:[ self name beginsWith: 'AnObsolete ............
where isObsolete TClass is:
self propertyAt: #obsolete ifAbsent: false
Thanks for considerations,
Dario
Ciao,
i work to port some code from Pharo 4.0 to Pharo 6.1-64.
My root class into Pharo 4.0 define the properties
instance variable and some relative method:
a) propertyAt: aKey ifAbsent: aBlock
^ self properties at: aKey ifAbsent: aBlock
b) propertyAt: aKey ifAbsentPut: aBlock
^ self properties at: aKey ifAbsentPut: aBlock
c) propertyAt: aKey put: aValue
^ self properties at: aKey put: aValue
d)......
Now when i port this code into the Pharo 6.1-64 when compile the code
the Behavior originalName method implement:
^ (( self isObsolete and:[ self name beginsWith: 'AnObsolete ............
where isObsolete TClass is:
self propertyAt: #obsolete ifAbsent: false
But my class implement a specific propertyAt: ifAbsent: method
and the system generates errors and don't compile the code.
Thank you for every consideration.
Dario
-- Guille Polito Research Engineer Centre de Recherche en Informatique, Signal et Automatique de Lille CRIStAL - UMR 9189 French National Center for Scientific Research - *http://www.cnrs.fr <http://www.cnrs.fr>* *Web:* *http://guillep.github.io* <http://guillep.github.io> *Phone: *+33 06 52 70 66 13