• 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
Re: Using alerts with Preference Panes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Using alerts with Preference Panes (From: "John Farmer" <email@hidden>)

  • Prev by Date: Re: Menus with ALT a la Finder
  • Next by Date: Re: what's the topmost NSWindow level
  • Previous by thread: Using alerts with Preference Panes
  • Next by thread: NetSocket listen
  • Index(es):
    • Date
    • Thread