Re: getting result of NSAlertPanel
Re: getting result of NSAlertPanel
- Subject: Re: getting result of NSAlertPanel
- From: Eric Peyton <email@hidden>
- Date: Fri, 26 Apr 2002 08:17:42 -0500
On Friday, April 26, 2002, at 07:25 AM, Mamdouh wrote:
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"...
int result;
result = NSRunInformationalAlertPanel(@"Title", @"InformationText",
@"OK", @"Later", @"Cancel",nil);
if result == NSAlertDefaultReturn;
NSRun*Panel returns the result.
Eric
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.
_______________________________________________
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.