• 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: Displaying a custom sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Displaying a custom sheet


  • Subject: Re: Displaying a custom sheet
  • From: Alvaro Costa Neto <email@hidden>
  • Date: Tue, 12 Apr 2011 18:58:45 -0300

Hi,

Check if the "Visible At Launch" checkbox for your sheet is unchecked in Interface Builder.
If this checkbox is checked, your sheet will appear floating in the middle of the screen on the first run, instead of below the window title bar as intended.

Best regards,
Alvaro Costa Neto

Em 12/04/2011, às 18:25, Luc Van Bogaert escreveu:

> Hi,
>
> I'm having some trouble to correctly display a custom sheet. Here's the relevant code I'm using. This code is run from the application delegate. "newGameLevelSheet" is a IBOutlet property defined with the "assign" modifier.
>
>        if (!self.newGameLevelSheet)
>            [NSBundle loadNibNamed:@"NewGameLevelSheet" owner:self];
>        [NSApp beginSheet:self.newGameLevelSheet
>           modalForWindow:self.window
>            modalDelegate:self
>           didEndSelector:@selector(didEndNewGameLevelSheet:returnCode:contextInfo:)
>              contextInfo:nil];
>
> The problem I'm having is that the first time this code runs, the sheet is displayed, but not modal to self.window, instead it is displayed "separated" from the application window (meaning non-modal at a different screen location). However, on all subsequent runs, the sheet is displayed correctly "tied" to the window, and I can also close it correctly by sending it an orderOut: message.
>
> I don't understand what is causing the window to be displayed non-modal the first time after it is loaded from the nib. Could anyone please provide some insights. Thank you.
>
> --
> Luc Van Bogaert
> email@hidden
>
>
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Displaying a custom sheet (From: Luc Van Bogaert <email@hidden>)

  • Prev by Date: Displaying a custom sheet
  • Next by Date: Re: Displaying a custom sheet
  • Previous by thread: Displaying a custom sheet
  • Next by thread: Re: Displaying a custom sheet
  • Index(es):
    • Date
    • Thread