Table_of_Contents.html
http://plectrum.com/novocard/
Message_handlers_2.html
Function_handlers.html

Parameter variables

A handler can receive values (called parameters) and use them as it runs. You represent each value with a parameter variable. A parameter variable always follows the handler name in a comma-separated list.


For example, when running the following touchUp handler, NovoCard calls displayMessage with two variables, "red" and "apple". It then binds these values to the parameter variables color and fruit in the displayMessage handler.


on touchUp

  send("displayMessage 'red', 'apple'");

end touchUp


on displayMessage color, fruit

  answer("I want a " + color + " " + fruit);

end displayMessage


You can use the variables color and fruit anywhere inside the handler. When NovoCard sees them, it uses the values currently bound to them. (The variables remain bound only while the handler runs.)