• 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
displaying a sheet with new document
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

displaying a sheet with new document


  • Subject: displaying a sheet with new document
  • From: The Baur Family <email@hidden>
  • Date: Sat, 26 Jun 2004 14:57:00 -0700

I'm trying to display a sheet (to connect to a database) in a document
based application. I'm using code that looks like this:

[NSApp beginSheet:connectionPanel
modalForWindow:consoleWindow
modalDelegate:nil
didEndSelector:nil
contextInfo:nil
];

My problem lies in where to put it... If I put it in awakeFromNib or
windowControllerDidLoadNibaController then I end up getting an error:

2004-06-26 14:50:05.938 SnortMAC[1768] *** Assertion failure in
-[NSApplication
_commonBeginModalSessionForWindow:relativeToWindow:modalDelegate:didEndSelector:contextInfo:],
AppKit.subproj/NSApplication.m:2763
2004-06-26 14:50:05.963 SnortMAC[1768] Modal session requires modal window

The funny part is that it works... I just get the errors on the
console. If I put a button in the document window that runs the same
code, then it works w/out error, so I know that things are connected
right and built right in IB... where should I put the code for this so
it happens automatically?

Thanks,
Eric
_______________________________________________
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: displaying a sheet with new document
      • From: Andreas Mayer <email@hidden>
  • Prev by Date: Re: Address Book madness
  • Next by Date: Re: URL formatting in NSAttributedString
  • Previous by thread: Obtaining and releasing a Carbon NSWindow
  • Next by thread: Re: displaying a sheet with new document
  • Index(es):
    • Date
    • Thread