views:

27

answers:

1

Hi,

I want to execute the following code:

methodName := thisContext sender method selector.
aClass selectors do: [:current | current == methodName ifTrue: aBlock].

Although the strings are equal, it never steps into the "ifTrue", I've tried converting both of them to ByteArray\String and it steel didn't work. Any ideas of how to compare them so I will get to the "ifTrue"?

Thanks in advance

A: 

You need to compare using the equality method (=) and not the identity method (==).

Oak