• 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
Sheets positioning.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sheets positioning.


  • Subject: Sheets positioning.
  • From: Brent Smith <email@hidden>
  • Date: Tue, 8 Sep 2009 10:53:36 -0700

Hello
I have a new file dialog that pops up as a sheet, hwoever on the first popup of this sheet, Its not positioned below the titlebar


http://i29.tinypic.com/2k287p.jpg

But if I hit cancel, and then open the dialog again, Its perfect.

http://i27.tinypic.com/e9uurl.jpg

Any idea what Im doing wrong?

Heres the code that initiates the sheet. Its loaded in from a xib
- (IBAction)add:sender
{
if (myWindow == nil)
{
NSBundle *myBundle = [NSBundle bundleForClass:[self class]];
NSNib *nib = [[NSNib alloc] initWithNibNamed:@"addFile" bundle:myBundle];

BOOL success = [nib instantiateNibWithOwner:self topLevelObjects:nil];
[nib release];

if (success != YES)
{
// should present error
return;
}
}
[[self titleField] setStringValue:@""];
[[self pathField] setStringValue:@""];
[NSApp beginSheet:myWindow modalForWindow:documentWindow modalDelegate:self didEndSelector:@selector (newObjectSheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];
}


_______________________________________________

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


  • Follow-Ups:
    • Re: Sheets positioning.
      • From: Jason Foreman <email@hidden>
  • Prev by Date: NSTextView resizeability and scrolling
  • Next by Date: Re: Anti-aliasing in Snow Leopard (10.6) PDFView
  • Previous by thread: Re: NSTextView resizeability and scrolling
  • Next by thread: Re: Sheets positioning.
  • Index(es):
    • Date
    • Thread