Anyone know carbon event handling?
I've been having a great annoynace trying to implement event handling, can anyone shed light?
The problem is when installing event handlers, on this function:
NewEventLoopTimerUPP((EventLoopTimerProcPtr)eventF unction);
which creates the event loop timer
My problem is that eventFunction() is not working, it is a function in the class that is handling/installing my events. It works if I put it outside the class, but not if it is a public or private function inside, and I sort of need it inside the class.
The error I get is: myClass.cpp:40: no matches converting function `eventFunction' to type `void (*)(struct __EventLoopTimer*, void*)'
Anyone?
The problem is when installing event handlers, on this function:
NewEventLoopTimerUPP((EventLoopTimerProcPtr)eventF unction);
which creates the event loop timer
My problem is that eventFunction() is not working, it is a function in the class that is handling/installing my events. It works if I put it outside the class, but not if it is a public or private function inside, and I sort of need it inside the class.
The error I get is: myClass.cpp:40: no matches converting function `eventFunction' to type `void (*)(struct __EventLoopTimer*, void*)'
Anyone?
Comments
but aside from the complicatedness i described above, there is no elegant way to get at the class (assuming u need to get at a particular instance of a class).
also, i should admit that i haven't worked very much with carbon or its event model. i went from classic right to cocoa; skipping the middle-man. and i haven't done classic event handling in more than a few years.