Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sheet not attached to window II



Hi All,

I saw a posting about this from November, but a solution wasn't posted and now I'm seeing this problem.

Here is the basic flow of the problem. I detect when a new document window is opened and want to use a sheet to help the user prepare the document for use. However, the sheet appears but its not stuck to the window. The sheet is a sheet and not a window because it is borderless, its just not in the right place...

Code:

MyController *sheet = [[MyController alloc] initWithDocument: [self document]];
NSLog([[self document] description]);
NSLog([[[self document] windowForSheet] description]);
NSLog([[[NSDocumentController sharedDocumentController] documents]description]);
[NSApp beginSheet:[sheet window] modalForWindow: [[self document] windowForSheet] modalDelegate: sheet didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:NULL];



Both the NSLog statements and gdb confirm that [self document] and [[self document] windowForSheet] return initialized objects.



Any ideas why this sheet is attached to the window? I'm running 10.5.1, and this is a Leopard only app.


Thanks,

Adhamh

_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.