Re: Sheet not appearing normally...the first time
Re: Sheet not appearing normally...the first time
- Subject: Re: Sheet not appearing normally...the first time
- From: Kevin Wojniak <email@hidden>
- Date: Tue, 23 Feb 2010 14:12:00 -0800
See if the Visible at launch checkbox is enabled in the nib for your window. If so, turn it off.
Kevin
On Feb 23, 2010, at 1:05 PM, Jean-Henri Duteau wrote:
> I have built a document-based application that brings up two sheets. I followed Apple's NSPersistentDocument sample app. For the first sheet, everything works fine. I click on my "Add Team" button and the Team sheet appears perfectly. For the second sheet, everything almost works fine. The first time that I click on my "Add Player" button, the Player sheet appears but not like a sheet, i.e. rolling down from the window's title bar. It appears in the same spot every time I launch the app and it is also not modal. If I close the sheet and click the button again, it then appears normally and fine.
>
> Here's the line of code that I have, which is the same code in each sheet controller:
>
> [NSApp beginSheet:skaterSheet
> modalForWindow:documentWindow
> modalDelegate:self
> didEndSelector:@selector(skaterSheetDidEditEnd:returnCode:contextInfo:)
> contextInfo:NULL];
>
> I've diffed my two sheet controller classes and they are the same. I've browsed both my MyDocument nib and the two sheet nibs and they appear to be bound the same. So I'm losing hair trying to figure out why the sheet doesn't appear properly just the first time.
>
> Jean
>
> _______________________________________________
>
> 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