Precedence of Types of Defaults
We have already mentioned that the user’s defaults take precedence over the factory defaults. In fact, several more levels of precedence exist. These levels of defaults are known as domains. Here are the domains used by an application, from highest to lowest priority:
- Arguments
-
Passed on the command line. Most people start applications by double-clicking an icon instead of from the command line, so this feature is seldom used in a production app.
- Application
-
What comes from the user’s defaults database.
- Global
-
Defaults that the user has set for his or her entire system.
- Language
-
Defaults based on the user’s preferred language.
- Registered defaults
-
The factory defaults ...
Get Cocoa Programming for OS X: The Big Nerd Ranch Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.