• 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
Using beginSheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using beginSheet


  • Subject: Using beginSheet
  • From: Hua Ying Ling <email@hidden>
  • Date: Fri, 20 Jul 2001 16:40:48 -0400

I'm trying to create a sheet for a window but I keep getting a error "Modal session requires modal window". What am I doing wrong in the code snipplet below?

Thanks
~Hua Ying

NSWindowController *newWindow = [[NSWindowController alloc] initWithWindowNibName: @"AddGroupDialog"];

NSModalSession session = [NSApp beginModalSessionForWindow:[newWindow window]];
[NSApp runModalSession:session];
[NSApp beginSheet:[newWindow window]
modalForWindow:mainWindow
modalDelegate: self
didEndSelector: @selector(didEndAddGroupSheet)
contextInfo: NULL];

[NSApp endModalSession:session];


  • Follow-Ups:
    • Re: Using beginSheet
      • From: j o a r <email@hidden>
  • Prev by Date: PDF setCurrentPage OS Bug ?
  • Next by Date: Re: Disabling some compiler warnings
  • Previous by thread: PDF setCurrentPage OS Bug ?
  • Next by thread: Re: Using beginSheet
  • Index(es):
    • Date
    • Thread