Skip to content

Commit

Permalink
CPAlert shouldn't use 'alert' as a variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
Randall Luecke committed Apr 13, 2012
1 parent 4fff92f commit 340b86e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions AppKit/CPAlert.j
Original file line number Diff line number Diff line change
Expand Up @@ -117,21 +117,21 @@ CPCriticalAlertStyle = 2;
*/
+ (CPAlert)alertWithMessageText:(CPString)aMessage defaultButton:(CPString)defaultButtonTitle alternateButton:(CPString)alternateButtonTitle otherButton:(CPString)otherButtonTitle informativeTextWithFormat:(CPString)informativeText
{
var alert = [[self alloc] init];
var newAlert = [[self alloc] init];

[alert setMessageText:aMessage];
[alert addButtonWithTitle:defaultButtonTitle];
[newAlert setMessageText:aMessage];
[newAlert addButtonWithTitle:defaultButtonTitle];

if (alternateButtonTitle)
[alert addButtonWithTitle:alternateButtonTitle];
[newAlert addButtonWithTitle:alternateButtonTitle];

if (otherButtonTitle)
[alert addButtonWithTitle:otherButtonTitle];
[newAlert addButtonWithTitle:otherButtonTitle];

if (informativeText)
[alert setInformativeText:informativeText];
[newAlert setInformativeText:informativeText];

return alert;
return newAlert;
}

/*!
Expand All @@ -142,12 +142,12 @@ CPCriticalAlertStyle = 2;
*/
+ (CPAlert)alertWithError:(CPString)anErrorMessage
{
var alert = [[self alloc] init];
var newAlert = [[self alloc] init];

[alert setMessageText:anErrorMessage];
[alert setAlertStyle:CPCriticalAlertStyle];
[newAlert setMessageText:anErrorMessage];
[newAlert setAlertStyle:CPCriticalAlertStyle];

return alert;
return newAlert;
}

/*!
Expand Down

0 comments on commit 340b86e

Please sign in to comment.