Dispatch

Bob Sneidar bobsneidar at iotecdigital.com
Wed Aug 3 12:14:47 EDT 2022


One correction. If a value is returned by the handler that was called, the result will be that value. 

Bob S


> On Aug 3, 2022, at 08:53 , Mark Wieder via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> One, if I'm calling a handler in a different object that is outside the normal message path then I'll dispatch the handler to that object rather than using send. One caveat: note that the dispatch command returns a three-state value: "handled", "unhandled", and "passed". So on checking the return value I use "if it it not unhandled then...". The advantage is that there's no runtime error if the command isn't caught, at the slight disadvantage of having to check whether it was handled.




More information about the use-livecode mailing list