Alert sheet question
Alert sheet question
- Subject: Alert sheet question
- From: Mark Dawson <email@hidden>
- Date: Fri, 17 Dec 2004 14:52:06 -0800
I'm trying to display a standard error alert (in 10.2 and later), with just the standard "OK" and an error string from a formatter. However, I'm getting a warning, "passing arg 7 of "NSBeginAlertSheet " from invalid pointer type". Can someone point out what my error is? I thought [self window] was the 7th argument & IS passing in an NSWindow *, but there must be something I'm not understanding. Thanks!
-(BOOL)control:(NSControl*)control
didFailToFormatString:(NSString*)string
errorDescription:(NSString*)error {
if (control == textField) // check field to validate
{
NSBeginAlertSheet(error, NULL /* use OK button */,
NULL, NULL, NULL, // no other buttons
control, // we'll be our own delegate (should be NULL?)
[self window], // get controller's window
NULL, NULL, NULL // NULL to rest of parameters,
// as just having user press OK
);
return NO;
}
return YES;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden