Duouh! And here's the relevant line from the sample app that I missed when I made the second sheet: Switch off its Visible at Launch flag.
Thanks, Jean On 2010-02-23, at 3:12 PM, Kevin Wojniak wrote: > 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 (Cocoa-dev@lists.apple.com) >> >> 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: >> http://lists.apple.com/mailman/options/cocoa-dev/kainjow%40kainjow.com >> >> This email sent to kain...@kainjow.com > _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com