Re: Display an Alert Sheet at a Specified Screen Position
Re: Display an Alert Sheet at a Specified Screen Position
- Subject: Re: Display an Alert Sheet at a Specified Screen Position
- From: Dave <email@hidden>
- Date: Thu, 26 Mar 2015 11:57:56 +0000
i tried this just to get something working for now, but it doesn’t seem to affect where the Alert is displayed.
myAlert = [NSAlert alertWithMessageText:@"Do you really want to do that?" defaultButton:@“No" alternateButton:@“Yes" otherButton:nil informativeTextWithFormat:@"It might cause mayhem!”];
myAlertWindow = myAlert.window;
myAlertWindowFrameRect = myAlertWindow.frame;
myAlertWindowFrameRect.origin = myNewOrigin;
[myAlertWindow setFrame:myAlertWindowFrameRect display:YES];
myAlertResponse = [myAlert runModal];
if (myAlertResponse == kDialogResponseYes)
{
}
else
{
}
I’ll investigate doing it using a sheet next week, but it would be nice to have the Alert working in the meantime.
Thanks
Dave
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden