Skip navigation.
 
mlRe: Are sheets broken in Leopard or I am doing something very wrong?
FROM : j o a r
DATE : Sun Jan 13 00:28:44 2008

On Jan 12, 2008, at 3:08 PM, Toplica Tanasković wrote:

>     I am trying to display custom sheet upon displaying new window in 
> Cocoa document based app.
> The problem is that sheet is not displayed as sheet but as normal 
> standalone window!? As far as I remember
> the method I'm using worked perfectly in Tiger. What am I doing wrong?



In this call:

   [NSApp beginSheet: connectionSheet
     modalForWindow: window
       modalDelegate: self
     didEndSelector: @selector(didEndSheet:returnCode:contextInfo:)
         contextInfo: nil];

The variable "window" is *nil*. Whenever that's the case, your sheet 
will appear as a standalone window.

To fix this:

   * Set the class of the files owner in your document nib to be 
PGWizDocument
   * Connect the window outlet of the files owner (the document) to the 
window in the nib

j o a r

Related mailsAuthorDate
mlAre sheets broken in Leopard or I am doing something very wrong? Toplica Tanaskovi? Jan 13, 00:08
mlRe: Are sheets broken in Leopard or I am doing something very wrong? j o a r Jan 13, 00:28