Well, I’ve searched and searched, and can’t figure out how to set up a custom eventClass and eventID for
setEventHandler_andSelector_forEventClass_andEventID_(me, “handleAppleEvent:”, ???, ???)
Everything I find says it’s easy enough if I want to trap a defined constant, but I’m not having luck coming up with what to put in at each ??? for my own 4 char class and ID codes. Just errors.
Surely somebody has done the same search and finally figured it out… Care to share?
Thanks.
Actually, I’ve made some progress… Put together a command-line utility to run a python unpack routine on codes, and it seems to be reacting to my event with new errors…
-[AppController handleAppleEvent:]: unrecognized selector sent to object <AppController @0x200540ce0: OSAID(11)>
which only happens when I send the event and ID I’ve punched in, and just sits there doing nothing when I send another ID.
Ahh. Finally got it. Well, partially… Was using with reply, but when I took that out, I am now logging my “Got Event”… So far I can do this without sending a reply… Now to figure out how to send a reply…
Obj-C was fun for a couple of days.