What would be the Cocoa equivalent for this code?
#include <Carbon/Carbon开发者_开发问答.h>
void check_apple_events() {
printf("check_apple_events\n");
RgnHandle cursorRgn = NULL;
Boolean gotEvent=TRUE;
EventRecord event;
while (gotEvent) {
gotEvent = WaitNextEvent(everyEvent, &event, 0L, cursorRgn);
}
}
Start by reading the How Cocoa Applications Handle Apple Events portion of the Cocoa Scripting Guide. Then read the rest of it and ask a more focused question.
精彩评论