On Tue, Aug 26, 2014 at 10:09 PM, Richard Gaskin <ambassa...@fourthworld.com > wrote:
> > Is there some reason I've overlooked as to why "send" allows timers but > "dispatch" doesn't? I don't know if there is a reason dispatch doesn't have timers, but what if "send" was just updated to support "with"? If "with" was present then we could do this: send "someCommand" to someObject with param1, param2 in 10 milliseconds The thing is, dispatch is useful if A) you want to know if the command was handled, B) you want to send a message and you don't care if it is handled (the engine doesn't report an error if "someCommand" isn't defined anywhere), or C) you want to call a command/function outside of the message path. I see this as a much improved version of the 'send "someCommand"' form of 'send'. Given how dispatch works, I see 'send is' as being what you use if you want to execute some code after the current event loop has finished executing. The downside is that the syntax stinks. But if the syntax were updated so that it supported the same form as dispatch then I think it would be great. I imagine the engine could also improve the speed to be on par with dispatch as the engine would know that "someCommand" wouldn't contain any variables that had to be processed (e.g. "someCommand param1, param2"). -- Trevor DeVore ScreenSteps www.screensteps.com - www.clarify-it.com _______________________________________________ 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