Hi,
can anybody please explain to me why this code is valid?
acceptanceMonitor completionBlock:
[:socket |
serverMonitor := BlockingCallMonitor new.
serverMonitor callBlock: [Compiler evaluate: socket receive logged:
false].
serverMonitor completionBlock: [:answer | socket send: answer].
serverMonitor errorBlock: [:error | Sound beep. serverMonitor
terminate].
serverMonitor monitor ].
I'm referring to the "serverMonitor" temp variable, how come it doesn't
have to be " [:socket || serverMonitor | ....]"?
If I again missed the obvious at least this time I've got a good excuse,
I'm recovering from the flu.
Günther
PS the sample above is copied from an object arts TCP/IP sockets sample.
http://www.object-arts.com/Lib/EducationCentre4/htm/monitoringblockingcalls.htm