Duplicate handler names

J. Landman Gay jacque at hyperactivesw.com
Tue Dec 18 17:55:09 EST 2012


On 12/18/12 4:10 PM, Peter Haworth wrote:
> I was surprised to discover today that duplicate handler names in a script
> are not flagged as errors when the script is compiled, nor do they cause a
> runtime error.
>
> I can see that a command handler and a function handler might be OK with
> duplicate names (although not sure why you'd want to do that) but I can't
> think of any reason why command handlers with the same name should be
> allowed.

There's no conflict, whichever handler appears first is executed and the 
ones below it are ignored. I sometimes use this to test different 
versions of a handler, I just keep putting the newest revision at the top.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list