What is an event handler?

Asked

Viewed 986 times

6

I have read what is an event, but then I saw that there are event handlers, Event Handler.

  • What is a Event Handler?
  • What they’re for and where they’re used for?
  • Exist in all languages?
  • 1

    Just to quote a detail handler is translated into English as "manipulative" and will notice this word in many places of programming, not just events, so I would say that everything that has events and these events can be intercepted are considered as a manipulation, then if the language allows interacting when an event is registered/added then you will have an Handler :) - Opinion only.

1 answer

6


Roughly speaking it is the action that must be executed when an event must be triggered. In general it is a method or function with a signing specific that will be called by the event. It is a callback.

Since it is an event handler, it is he who responds when an event is triggered, it is he who manipulates the event and does something.

They are usually attached to objects that need to be notified of events that occur with other objects to exercise some action.

The exact form of implementation may vary. Some may be created by language, library, or manually. The API that generates the event will determine how it needs to be done.

The other questions cannot be answered and are irrelevant information. At least in the asked form.

See more:

Browser other questions tagged

You are not signed in. Login or sign up in order to post.