Pass - is it really needed

Robert Brenstein rjb at robelko.com
Thu Mar 16 20:57:11 EST 2006


>Hello friends,
>
>I am writing a lot of commands and functions for a library and was 
>wondering if the Pass handler name was a necessity? I mean, If I am 
>not using a handler name that is a part of transcript then do I 
>really want the handler to pass after running it? What would be a 
>reason I would.
>The reason I ask is that when I insert a new command it throws in a 
>pass with that commands name by default. I don't normally use the 
>Pass except when using an On card or other transcript handler.
>
>Thanks,
>
>Tom
>Busy again,
>
>Thomas J McGrath III
>3mcgrath at adelphia.net

The script editor is just trying to be friendly and reduce the amount 
of typing for you. Using pass is your call and depends on what you 
want to achieve.

Normally, you would not pass your own handlers unless you do 
multi-tiered processing; for example, card handler does card-specific 
stuff and passes it further so background handler can do 
background-specific stuff and/or stack can do stack-wide stuff. The 
situation with standard messages is a tad different. Here, you would 
usually pass the call unless you want to terminate processing; for 
example, having openStack on card level without pass will prevent the 
openStack handler in the stack script from executing.

Robert



More information about the Use-livecode mailing list