- SmalltalkBestPracticePatterns/DispatchedInterpretation
Sometimes, however, information in one object must influence the behavior of another. When the uses of the information are simple, or the possible choices based on the information limited, it is sufficient to send a message to the encoded object. Thus, the fact that boolean values are represented as instances of one of two classes, True and False, is hidden behind the message #ifTrue:ifFalse:.
때때로, 그러나, 한 객체의 정보는 다른 객체의 행위에 영향을 미칠 것이다. 정보의 사용이 단순할 경우, 또는 제한된 정보에 기반해서 선택이 가능할 경우에는 인코딩된 객체에게 메시지를 보내는 것이 충분히 가능하다. 이와 같이, 부울린 값들은 두 클래스의 하나의 인스턴스로 표현되어진다는 사실은, True 그리고 False, 메시지 #ifTrue: ifFalse:. 뒤로 숨겨진다
True>>ifTrue:trueBlock ifFalse:falseBlock
False>>ifTrue:trueBlock ifFalse:falseBlock
Found 1 matching page out of 7540 total pages
You can also click here to search title.