Difference between revisions of "Vision4Mac Documentation"

 
(Event Handling)
Line 1: Line 1:
= Event Handling =
+
== Event Handling ==
 +
Due to some limitations of the wrapper generater we are using event handling is not quite trivial, but here's what you have to do if you want to add a new event:
 +
 
 +
In the creation procedure you need to have something like this:
 +
<pre>
 +
id := app_implementation.get_id (current)
 +
 
 +
app_implementation.install_event_handler (id, target, {carbonevents_anon_enums}.kEventClassControl, {carbonevents_anon_enums}.kEventMouseDown)
 +
</pre>
 +
 
 +
This code first gets an application-wide unique ID. The system needs this to find out which object triggered the event.
 +
Then ...

Revision as of 05:17, 11 August 2006

Event Handling

Due to some limitations of the wrapper generater we are using event handling is not quite trivial, but here's what you have to do if you want to add a new event:

In the creation procedure you need to have something like this:

id := app_implementation.get_id (current)

app_implementation.install_event_handler (id, target, {carbonevents_anon_enums}.kEventClassControl, {carbonevents_anon_enums}.kEventMouseDown)

This code first gets an application-wide unique ID. The system needs this to find out which object triggered the event. Then ...