Re: Using alerts with Preference Panes
Re: Using alerts with Preference Panes
- Subject: Re: Using alerts with Preference Panes
- From: Andreas Schempp <email@hidden>
- Date: Thu, 8 May 2003 18:54:23 +0200 (MEST)
You can't attach the alert panel to your window, because System
Preferences.app takes the view from your window and attaches it to it's own.
Use [NSApp mainWindow]. This works.
>
I'm creating a preference pane, and I need an alert to show up if user
>
information was incorrectly supplied. I tried using the NSBeginAlertSheet
>
with my sample application and it worked fine, but when I moved the code
>
over to my preference pane, the compiler did not seem to recognize my
>
NSWindow (_window or a new outlet for window). My function call looks
>
like
>
this:
>
>
NSBeginAlertSheet (
>
msg1,
>
@"OK",
>
nil,
>
nil,
>
[self _window], // or [self window]
>
self, // Modal deligate
>
null, // did-end selector
>
null, // did-dismiss selector
>
sender, // context info
>
msg2, // optional message
>
nil); // additional params
>
>
Any help would be very appricaited.
>
>
Thanks,
>
>
John Farmer
>
_______________________________________________
>
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.