[英]How do I compare between ByteString and ByteSymbol in squeak?
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. 尽管字符串是相等的,但它从未进入“ ifTrue”,我尝试将它们都转换为ByteArray \\ String,并且钢结构不起作用。 Any ideas of how to compare them so I will get to the "ifTrue"?
关于如何比较它们的任何想法,以便我了解“ ifTrue”吗?
您需要使用相等方法(=)而不是身份方法(==)进行比较。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.