Re: [Pharo-project] senders vs implementors
On Jan 12, 2011, at 3:25 PM, Tudor Girba wrote:
Hi,
I think I encountered an error in allImplementorsOf:, but I am not quite sure and I wanted to run it by you first.
If you evaluate (self systemNavigation allSendersOf: #browse) anyOne sourceCode.
you get the source as expected.
However, if you evaluate: (self systemNavigation allImplementorsOf: #browse) anyOne sourceCode.
you get an error.
The last snippet used to work just fine in Pharo 1.1.1.
I consider it a bug. What do you think?
Yes, this is a bug. (the whole MethodReference stuff is right now in the process of being re-designed...) One workound is to get the real method and ask it for the code: (self systemNavigation allImplementorsOf: #browse) anyOne compiledMethod getSource. arcus -- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
Thanks, Marcus. Cheers, Doru On 12 Jan 2011, at 15:56, Marcus Denker wrote:
On Jan 12, 2011, at 3:25 PM, Tudor Girba wrote:
Hi,
I think I encountered an error in allImplementorsOf:, but I am not quite sure and I wanted to run it by you first.
If you evaluate (self systemNavigation allSendersOf: #browse) anyOne sourceCode.
you get the source as expected.
However, if you evaluate: (self systemNavigation allImplementorsOf: #browse) anyOne sourceCode.
you get an error.
The last snippet used to work just fine in Pharo 1.1.1.
I consider it a bug. What do you think?
Yes, this is a bug.
(the whole MethodReference stuff is right now in the process of being re-designed...)
One workound is to get the real method and ask it for the code:
(self systemNavigation allImplementorsOf: #browse) anyOne compiledMethod getSource.
arcus
-- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
-- www.tudorgirba.com "Be rather willing to give than demanding to get."
participants (2)
-
Marcus Denker -
Tudor Girba