O'Reilly logo

Cocoa Programming for OS X: The Big Nerd Ranch Guide by Aaron Hillegass, Adam Preble, Nate Chandler

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required