2

Ok, so it's like this:

receiver selectors

returns

#(#expression #expression: #mondrianLabel #accept: #name)

But

receiver expression

throws MessageNotUnderstood.

Any ides how to fix this and why this can be caused?

Uko
  • 13,134
  • 6
  • 58
  • 106
  • 1
    I think you best clarify your question by changing `statement` to `receiver`. This is a more appropriate naming. – Johan B Dec 02 '12 at 12:44

1 Answers1

4

You are probably sending the message expression to a class instead of an instance of that class.

If the result of evaluating receiver selectors is #(#expression #expression: #mondrianLabel #accept: #name) then receiver is most probably a class. The message #selectors is implemented on the class Behavior and returns the selectors of the instance methods of the class. In other words: instances of the class (or any of its subclasses) understand the messages listed.

Hence, if you evaluate receiver expression, then you will get a message not understood exception because the message #expression is defined on the instance of the class that is the value of your receiver variable.

Johan B
  • 2,461
  • 14
  • 16
  • Thank. I've figured it out myself 5mins after posting a question, but before that I've spent about half a hour investigating… – Uko Dec 02 '12 at 12:51