Message-ID: <698797770.1199.1369216164515.JavaMail.firstname.lastname@example.org> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1198_814978848.1369216164515" ------=_Part_1198_814978848.1369216164515 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
What's that timmy? You're exposing your API to someone else, and they wa= nt convient handy-dandy events?! No problem! As with everything in Boo, it= s dead simple to get up and running within moments with th= e event keyword.
Aww, yeah! Now you can use it like any other event!
(it prints out "Tah CLICKED!" if you're curious)
By now you're probably wondering what "EventHandler" is. In .N= ET, they are commonly referred to as delegates, a type of event that can be= subscribed to by multiple functions, as long as each function has the same= method signature as the delegate. An "event" is a special kind o= f delegate that has some rules:
This keeps sneaky coders from invoking an event from somewhere else and = potentially messing things up. Leaky boats are bad!
Suppose, though, you want a ham sandwich on rye, or you want to expose a= unique kind of event that has its own unique arguments. Here's another cod= e sample to whet your apetite:
Callable Types, Functions, P= arameters, Events------=_Part_1198_814978848.1369216164515--