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 (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

Reply via email to