Challenge: Different Messages for Different Situations

As RaiseMan behaves now, when the user only selects one employee to remove, the alert sheet will have broken English in it:

Figure 15.9  Bad grammar in RaiseMan’s alert sheet

Bad grammar in RaiseMan’s alert sheet

This is happening because the same string is being used for the alert’s informativeText regardless of the number of employees that may be removed. When the user attempts to remove a single employee, make the alert’s informative text be “1 person will be removed.” While making this change, be sure to preserve the informative text that is displayed when the user attempts to remove several employees. ...

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.