Send allows you to send in time. However the command or function must exist or 
you will throw an error. Dispatch cannot use send in time, but if a handler 
does not exist in the message path of the object you dispatch to, no error will 
be thrown. 

This can come in handy. Let's say you have assigned a behavior in all your 
fields, but in a few of your fields you have a special handler called Cleanup. 
You can then, 'dispatch "cleanup" to me' in any handler in the behavior. The 
fields that have the cleanup handler will get the message. The ones that don't 
will not throw an error. 

Bob S


> On Aug 3, 2022, at 07:30 , Craig Newman via use-livecode 
> <use-livecode@lists.runrev.com> wrote:
> 
>> On Aug 3, 2022, at 9:36 AM, Sean Cole via use-livecode 
>> <use-livecode@lists.runrev.com> wrote:
>> 
>> Hi all,
>> I've been thinking about the command 'dispatch'. Is there any
>> advantage/disadvantage in using it over just calling your handler?
>> Thanks
>> Sean


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

Reply via email to