It is typical for Mac OS X apps to have preferences that apply seamlessly, and preferences dialogs don't have "OK" or "Apply" button. I want to implement this behavior in my project, but I can't decide when to apply/save changes made by user.
It's quite clear that checkboxes and drop-downs can be saved immediately upon change, but when it comes to text fields, this approach seems questionable. For example, entering "programming.stackexchange.com" as host address will trigger 29 HDD writes, which seems just wrong. Moreover, in my simple implementation this will cause the entire settings file to be rewritten.
So is there any standard way to implement MacOS-like preferences?