• 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: custom sheet modal to window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: custom sheet modal to window


  • Subject: Re: custom sheet modal to window
  • From: Sherm Pendley <email@hidden>
  • Date: Sun, 9 May 2004 13:54:03 -0400

On May 9, 2004, at 12:49 PM, Chuck Soper wrote:

I'm trying to display a custom sheet that is model to the window only. I want the rest of the application of remain functional.

Get rid of the app modal calls, and move the code to close the sheet to the okAbout: action method.

- (IBAction)about:(id)sender
{
[NSApp beginSheet: aboutSheet
modalForWindow: [parentWindowController window]
modalDelegate: nil
didEndSelector: nil
contextInfo: nil];
}

- (IBAction)okAbout:(id)sender;
{
[NSApp endSheet: aboutSheet];
[aboutSheet: orderOut: self];
}

I followed the example here:
http://developer.apple.com/documentation/Cocoa/Conceptual/Sheets/ Tasks/UsingCustomSheets.html#//apple_ref/doc/uid/20001290

I've been wondering why people kept mistakenly using -runModalForWindow: with sheets for *years* now. Literally years - ever since 10.0. Now I know. What a horrible example!

Looks like I'll be getting acquainted with radar...

sherm--
_______________________________________________
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.


  • Follow-Ups:
    • Re: custom sheet modal to window
      • From: Brent Gulanowski <email@hidden>
    • Re: custom sheet modal to window
      • From: Chuck Soper <email@hidden>
References: 
 >custom sheet modal to window (From: Chuck Soper <email@hidden>)

  • Prev by Date: Re: Callbacks, GUI updates and threading
  • Next by Date: Father and child
  • Previous by thread: custom sheet modal to window
  • Next by thread: Re: custom sheet modal to window
  • Index(es):
    • Date
    • Thread