Hi, Is there a way from an instance to access a method situated 2 layers up in the class hierarchy? A kind of super super. Thanks Hilaire -- Dr. Geo http://drgeo.eu
You should be able to call super super, as high up as you need to go. At least you can in VA Smalltalk. Brad Selfridge 913-269-2385
On Jan 15, 2017, at 3:42 PM, Hilaire <hilaire@drgeo.eu> wrote:
Hi,
Is there a way from an instance to access a method situated 2 layers up in the class hierarchy?
A kind of super super.
Thanks
Hilaire -- Dr. Geo http://drgeo.eu
#perform:withArugments:inSuperclass: | menu | menu := MenuMorph new. menu isMorph. "true" menu perform: #isMorph withArguments: #() inSuperclass: Morph. "true" menu perform: #isMorph withArguments: #() inSuperclass: Object."false" menu perform: #isMorph withArguments: #() inSuperclass: ProtoObject. "Error #isMorph not implemented" Best regards, Henrik -----Opprinnelig melding----- Fra: Pharo-users [mailto:pharo-users-bounces@lists.pharo.org] PÃ¥ vegne av Hilaire Sendt: 15 January 2017 21:42 Til: pharo-users@lists.pharo.org Emne: [Pharo-users] super super Hi, Is there a way from an instance to access a method situated 2 layers up in the class hierarchy? A kind of super super. Thanks Hilaire -- Dr. Geo http://drgeo.eu
Thanks Henrik Le 15/01/2017 à 22:33, Henrik Nergaard a écrit :
menu perform: #isMorph withArguments: #() inSuperclass: ProtoObject. "Error #isMorph not implemented"
-- Dr. Geo http://drgeo.eu
No and I'm happy that this is like that. I think that it means that you need to create special hooks in the super superclass.
Hi,
Is there a way from an instance to access a method situated 2 layers up in the class hierarchy?
A kind of super super.
Thanks
Hilaire
-- Using Opera's mail client: http://www.opera.com/mail/
Agree on the hook. However the super class are not mine. Not an ideal situation Le 21/01/2017 à 11:19, stepharong a écrit :
No and I'm happy that this is like that. I think that it means that you need to create special hooks in the super superclass.
-- Dr. Geo http://drgeo.eu
Out of curiosity, wouldn't it be better to temporarily duplicate the code in your class and talk with the upstream owner? (That would be my usual approach.) Peter On Sat, Jan 21, 2017 at 06:04:12PM +0100, Hilaire wrote:
Agree on the hook. However the super class are not mine. Not an ideal situation
Le 21/01/2017 à 11:19, stepharong a écrit :
No and I'm happy that this is like that. I think that it means that you need to create special hooks in the super superclass.
-- Dr. Geo http://drgeo.eu
Worst than that :) In theory I can refactor the super code and commit, but SmalltalkHub does not let me commit even I have RW access... So I have to knock at the Philippe's or Masashi's door so they can commit it for me. It's annoying to bother busy people. Anyway enough small talk ;) Le 21/01/2017 à 19:17, Peter Uhnak a écrit :
Out of curiosity, wouldn't it be better to temporarily duplicate the code in your class and talk with the upstream owner? (That would be my usual approach.)
-- Dr. Geo http://drgeo.eu
participants (5)
-
Brad -
Henrik Nergaard -
Hilaire -
Peter Uhnak -
stepharong