Shamyl Zakariya wrote:

So first off, is there some built-in way to simply 'goose' the app and cause its defaults bindings to trigger?


There are any number of ways. You could send a signal with the standard C function kill(). You could send a distributed notification (see NSDistributedNotificationCenter). You could send a UDP packet, or a multicast packet. The list goes on: pipes, file- system, shared memory, apple-events, etc.

Each way of sending has a corresponding way of receiving: sigaction (), NSDistributedNotificationCenter handler, packet listener, etc.


If not, what's the best practice here? And if I were to use some sort of apple event fired from the prefpane or some other technique to let the app know its defaults have changed, how do I get the user defaults controller in the headless app to apply the updates?


If I understand the question correctly, then when the signal is received, your headless app calls -synchronize on the NSUserDefaults. This assumes you don't have any shared-access contention issues.
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to