Fandom

Livecode Wiki

Handler

1,968pages on
this wiki
Add New Page
Comments0 Share

A handler is essentially a programming routine. It “handles” a task, basically. It has a starting clause and a ending clause, like:

on MouseUp
  put "Hello world!"
end MouseUp

Variables and many settings are resetted outside the handler, so it's easy to avoid mistakes. For example:

on handler1
  put 5 into temp
  answer temp #this returns "5"
end handler1

on handler2
  answer temp #this return "temp", because temp has no value
end handler2

Handlers are:

If you need to keep a variable between handlers use Custom properties.

If your code is very short, you may use local and Global variables; but they usually point to mistakes with long e complex programs.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.