• 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: Window Sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Window Sheet


  • Subject: Re: Window Sheet
  • From: David Wood <email@hidden>
  • Date: Wed, 19 Mar 2003 13:50:37 -0500

On Wednesday, March 19, 2003, at 05:53 AM, Suman Ganguly wrote:

Hi All,

I have a window having two buttons, I want to use the window to be popped up
as a sheet in my application window. Below I'm pasting the line of code I'm
using -

[ [ NSApplication sharedApplication ] beginSheet: myWindow modalForWindow:
mainWindow modalDelegate: self didEndSelector:
@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo: NULL ];

After executing the line, the window doesn't appear as a sheet. I'll be very
much grateful if anyone can tell me what I'm missing or any kind of
suggestion will be appreciated.

Not long ago I tripped myself up with a sheet too. The window the sheet was to be attached to came up normally and worked fine, but the dialog sheet came up in its own window and acted funny.

The mistake I'd made was instantiating the view that was supposed to call the sheet; the application had its own window which worked fine, but I was trying to attach the sheet to the *instantiated* view's window (which didn't exist).

Result: some seriously screwed-up sheet.

Moral: Fear the NIB. It's possible to instantiate and connect things in Interface Builder that will cause bad craziness in an otherwise perfectly coded Project Builder project.

Here it looks like you're using your own NSApp object. Does mainWindow refer to the same window that you think it does?


--David http://skipjack.bluecrab.org/~dwood

"Yo quiero el bazo de ese molesto perro!"
("I want the spleen of that annoying dog!")
_______________________________________________
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: 
 >Window Sheet (From: Suman Ganguly <email@hidden>)

  • Prev by Date: How to distinguish if a file is a Document or an Application
  • Next by Date: Re: How to distinguish if a file is a Document or an Application
  • Previous by thread: Re: Window Sheet
  • Next by thread: Trapping window close event
  • Index(es):
    • Date
    • Thread