callbacks
Chipp Walters
chipp at chipp.com
Fri Mar 2 19:15:15 EST 2007
You know, you can create callbacks in libraries, too. Just make sure
you know the control objID from which a library call was made, then
send a message back to the object after a handler is completed. This
is really handy for out of process stuff. Don't forget to have a
callback handler in your library to 'catch' the callback in case it
isn't handled by the calling object.
For instance, say you have a generic internet lib which has a bunch of
stuff in it to handle downloads, etc..
You might have a callback "ImBusy" sent to an object which is
downloading a file which has a script associated with it in the
originating object:
on ImBusy pBool,pMsg
if pBool is true then
(turn on animation gif)
else
(turn off animation gif)
end if
put pMsg into fld "theStatus"
end ImBusy
then in your library, you might have the same callback handled
differently, just in case your object didn't handle it.
on ImBusy pBool,pMsg
(add pMsg to the logfile)
end ImBusy
-Chipp
More information about the use-livecode
mailing list