don't understand why cascading doesn't work
I'm embarrassed to write about this. I've been playing with the code, reading docs, etc. for an hour: With a Transcript window open, executing any of the following lines (from a Playground): Transcript show: 1; ' '; 2; cr. Transcript show: 'a'; cr; 'b'. Transcript show: 1; cr; '2'. fails, after which is shown a pink box with the text 'Message expected ->'. I'm sure it's something simple. What am I missing? Thanks.
Gregg,
On 21 Aug 2018, at 08:08, Gregg Williams <gregg13@innerpaths.net> wrote:
I'm embarrassed to write about this. I've been playing with the code, reading docs, etc. for an hour:
With a Transcript window open, executing any of the following lines (from a Playground):
Transcript show: 1; ' '; 2; cr.
Transcript show: 'a'; cr; 'b'.
Transcript show: 1; cr; '2'.
fails, after which is shown a pink box with the text 'Message expected ->'.
I'm sure it's something simple. What am I missing? Thanks.
You have to repeat the selector, you cannot send a string or a number to an object. #cr is a message though. Transcript show: 1; show: ' '; show: 2; cr. Transcript show: 'a'; cr; show: 'b'. Transcript show: 1; cr; show: '2'. Furthermore, Transcript only generates output with #show: or #crShow: else it buffers until you send #endEntry or #flush. HTH, Sven
On Mon, Aug 20, 2018, 23:09 Gregg Williams <gregg13@innerpaths.net> wrote:
I'm embarrassed to write about this. I've been playing with the code, reading docs, etc. for an hour:
With a Transcript window open, executing any of the following lines (from a Playground):
Transcript show: 1; ' '; 2; cr.
Transcript show: 'a'; cr; 'b'.
Transcript show: 1; cr; '2'.
fails, after which is shown a pink box with the text 'Message expected ->'.
I'm sure it's something simple. What am I missing? Thanks.
Sven has answered. I would offer the clarification that "cascaded" refers to message sends. You send successive messages to the same receiver. Those messages may or may not take arguments.
participants (3)
-
Gregg Williams -
Richard Sargent -
Sven Van Caekenberghe