On 2015-05-10 02:13, Dr. Hawkins wrote:
On Sat, May 9, 2015 at 12:03 PM, Mark Waddingham <[email protected]> wrote:

So where I really should be going then, is

on newClient clAdr
doSomeStuff
read from socket clAdr with message "dhbkProcScktDat"
end newClient

on dhbkProcScktDat skt, msg
doSomethingWith Data
read from socket sckt with message "dhbkProcScktDat"
end dhbkProcScktDat

So that when it processes data, it puts itself back in place to do it again.

This is the correct form. Note there is no nesting here - the callback message 'dhbkProcScktDat' will be sent as an engine event (just like mouseUp) so can only happen when the current handler stack has finished executing or the engine hits a 'wait with messages' command. i.e. the callback message is sent in exactly the same way as a message 'sent in 0 ms'.

--
Mark Waddingham ~ [email protected] ~ http://www.livecode.com/
LiveCode: Everyone can create apps

_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to