Carbon events
ok, I've got this event code (a modified quit handler)...
which gives this error...
cannot implicitly convert
from: (struct OpaqueEventTargetRef *(*__pascal "Pascal")(void))
to : (struct OpaqueEventTargetRef *)
any suggestions people? I'm sure InstallEventHandler is the cause...
Code:
EventTypeSpec quitEvent[] = {kEventMouseDown};
EventHandlerUPP quitEventHandler;
EventHandlerRef quitEventHandlerRef;
...
quitEventHandler = NewEventHandlerUPP((EventHandlerProcPtr)do_QuitEventHandler);
InstallEventHandler(GetApplicationEventTarget, quitEventHandler, 1, quitEvent, NULL, quitEventHandlerRef);cannot implicitly convert
from: (struct OpaqueEventTargetRef *(*__pascal "Pascal")(void))
to : (struct OpaqueEventTargetRef *)
any suggestions people? I'm sure InstallEventHandler is the cause...
Mark Bishop
GetApplicationEventTarget() with brackets. You have to call the function, not pass its address
heh, plus &quitEventHandlerRef. thanks OneSadCookie, I'd just been confused with passing functions as pointers to NewEventHandlerUPP() beforehand.
Mark Bishop
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| [For David, aarku] Carbon Events | OneSadCookie | 4 | 3,895 |
Mar 5, 2013 10:20 PM Last Post: SethWillits |
|
| Carbon events in windowed/full screen mode. Help needed. | Anton Petrov | 1 | 3,159 |
Dec 18, 2008 05:35 AM Last Post: DoG |
|
| Simulating "system idle" events in Carbon applications | ascotti | 4 | 2,923 |
May 2, 2006 03:22 PM Last Post: OneSadCookie |
|
| Carbon Key Events | Nickolei | 7 | 4,392 |
Nov 17, 2002 03:37 PM Last Post: codemattic |
|
| Carbon Keyboard Events | IBethune | 7 | 4,944 |
Oct 22, 2002 05:58 AM Last Post: IBethune |
|

