parameter variables question

Alex Rice alrice at ARCplanning.com
Tue Jul 29 17:46:00 EDT 2003


On Tuesday, July 29, 2003, at 04:22  PM, Scott Rossi wrote:

> Try changing "return" to "answer" or "put".
>
> Otherwise, change "on testIt" to "function testIt".
>
> I believe the word "return" is reserved for functions, not handlers.

Scott, and Chris:

RR Docs say
"""
Returning an error from a message handler
When used in a message handler, the return control structure serves a 
slightly different purpose: it returns an error message to the calling 
handler.

When used in a message handler, the return control structure sets the 
result function for the calling handler. If you want to return an error 
message to the calling handler, use the return control structure within 
the message handler.

Here’s an example of a message handler that displays a dialog box:

   on echoAMessage
     ask "What do you want to show?"
     if it is empty then return "No message!"
     else answer it
   end echoAMessage

"""

Alex Rice, Software Developer
Architectural Research Consultants, Inc.
http://ARCplanning.com




More information about the use-livecode mailing list