• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
getting result of NSAlertPanel
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

getting result of NSAlertPanel


  • Subject: getting result of NSAlertPanel
  • From: Mamdouh <email@hidden>
  • Date: Fri, 26 Apr 2002 14:25:50 +0200

Hi...

This a very simple (probably newbie) question. I have a NSInformationalAlertPanel and i want to get the result of the button selected by the user, so i can make some kind of action for that button...
heres a snip:
<<<<<<<<<<<<

if ( [YadaYadaYada:moreYada] )
{
NSRunInformationalAlertPanel(@"Title", @"InformationText", @"OK", @"Later", @"Cancel",nil);
}

<<<<<<<<<<<<<

I looked inside the TextEdit example and it does something like this:

if (result == NSAlertDefaultReturn) {
[SomeKindofAction];
}

But this doesnt work because i have to define "result"... But i saw an example (Cant remember which) that the programmer without defining anything could get the result of buttons and make an action!
So i need help in figouring out how to get the result of the buttons!

T.I.A

Mamdouh
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: getting result of NSAlertPanel
      • From: Eric Peyton <email@hidden>
    • Re: getting result of NSAlertPanel
      • From: email@hidden
  • Prev by Date: Re: Wait / Busy Cursor
  • Next by Date: Re: Undo - Redo?
  • Previous by thread: Re: NSURL from behind firewall
  • Next by thread: Re: getting result of NSAlertPanel
  • Index(es):
    • Date
    • Thread