• 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
Alert sheet question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Alert sheet question
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Running without a dock icon - weird keyDown problem
  • Next by Date: Solved: Running without a dock icon - weird keyDown problem
  • Previous by thread: Solved: Running without a dock icon - weird keyDown problem
  • Next by thread: Re: Alert sheet question
  • Index(es):
    • Date
    • Thread