Duplicate handler names

dunbarx at aol.com dunbarx at aol.com
Tue Dec 18 23:30:36 EST 2012


This dates to 1987. Only the first one is valid, the others ignored.As Jacque says, very useful when fooling around with the structure of a handler, and you want to keep the original, or another version, below for reference. You do not have to comment the lower one out, which is convenient.


Craig Newman



-----Original Message-----
From: Robert Sneidar <slylabs13 at me.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Tue, Dec 18, 2012 10:30 pm
Subject: Re: Duplicate handler names


Not so unusual, seeing you can have a mouseUp in a button and a card and pass 
the message. I can envision doing something similar with a custom handler. In 
the same script though, that does seem odd. 

Bob Sneidar
IT Manager
Calvary Chapel CM
Sent from iPhone

On Dec 18, 2012, at 15:19, Peter Haworth <pete at lcsql.com> wrote:

> Right, I see what happens and I see that you can make use of it test
> different versions of a handler, but I'd have to respectfully disagree that
> this isn't a conflict.  Seems like minimum there should be a warning of
> some sort for those of us who didn't know this wasn't an error.
> Pete
> lcSQL Software <http://www.lcsql.com>
> 
> 
> 
> On Tue, Dec 18, 2012 at 2:55 PM, J. Landman Gay <jacque at hyperactivesw.com>wrote:
> 
>> 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
>> 
>> ______________________________**_________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/**mailman/listinfo/use-livecode<http://lists.runrev.com/mailman/listinfo/use-livecode>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

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

 



More information about the use-livecode mailing list