> On 7 Sep 2016, at 17:09, Andreas Falkenhahn <andr...@falkenhahn.com> wrote: > > > Still, I'm wondering: Is it also possible to have NSNotificationCenter call > a C function for me whenever the notification triggers? Can this somehow > be achieved or am I forced to use full Objective C here? > I would go about this by creating a singleton Obj-C object to handle all my notifications. I would then register C Function pointers with this, perhaps using an NSMapTable or its CF equivalent to track the relationship between the incoming notification and the desired c function. When the notification comes in I look up my map and call the C function.
HTH J _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com