|
I'm looking at the code from the Appendix 1 : P2P chat in tweak.
Is it correct to assume the following ?
anObject runscript: #message when:{aSender. #event}.
if we then look at the example. we see
self runScript:#servChatMessage:for:when:{aSpace. #chatMessage}.
==> Is this what we call the eventhandler?
self runScript takes care that the event can take place at any time that aSpace calls the message(method) chatMessage?
This code has to be entered at the place you want the code to be executed right? Or doesn't this matthers?
But i don't understand the meaning of servChatMessage? Is this just for checking either the event has to be exeucted or not or why do we call this method.
aSender signal:#event.
This have to entered at the place where the event is triggered. Here #event is just the name of the method you want to be executed.
These are the 2 parts (and the event himself offcourse) that we need to create a new event i suppose.
|