Hi everyone.

I have been attempting to create a NSAlert popup and get the result (so it
can run an if statement) for the last few hours, but I still can't get it to
work.  My current code is below, if anyone wants to have a look see... If
anyone could point me in the right direction, it would be much appreciated!


Sincerely,

Pierce F.


-- Code --

-(void)someFunction
{
NSAlert * askToContinue = [NSAlert alertWithMessageText:@"Message"
defaultButton:@"Button 1"
                                               aleternateButton:@"Button 2"
                                                     otherButton:nil
                                informativeTextWithFormat:@"Message to
User"];


            [askToContinue runModal];
}



- (void)alertEnded:(NSAlert *)alert
              code:(int)choice
           context:(void *)inContextOfItem
{
    if (choice != NSAlertDefaultReturn)
    {
        // Do something
    }

}



-- End Code --


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to