Sheets positioning.
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