• 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
Sheet comes up inactive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sheet comes up inactive


  • Subject: Sheet comes up inactive
  • From: Dave Riggle <email@hidden>
  • Date: Wed, 24 Sep 2003 14:05:42 -0700

I have an NSWindowController that controls an NSPanel. When I put up a sheet on top of it, the sheet and window both go inactive. When I dismiss the sheet, the owning window stays inactive. I've tried making the sheet window out of an NSWindow as well as an NSPanel. Both exhibit the same behavior. How do I get the sheet to stay active? My code is below.

Dave


@implementation WindowController

- (id)init
{
if (self = [super init]) {
[NSBundle loadNibNamed:@"EditWindow" owner:self];
}
return self;
}

- (void)showWindow
{
// show window
[[self window] makeKeyAndOrderFront:nil];
}

- (IBAction)doneButton:(id)sender
{
// close window
[[self window] orderOut:sender];
}

- (IBAction)bringUpSheetButton:(id)sender
{
// show sheet
[NSApp beginSheet:m_Sheet modalForWindow:[self window]
modalDelegate:self didEndSelector:@selector(sheetDidEnd:returnCode:contextInfo:) contextInfo:nil];
}

- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
}

- (IBAction)sheetDoneButton:(id)sender
{
// close sheet
[m_Sheet orderOut:sender];
[NSApp endSheet:m_Sheet returnCode:0];
}

@end
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: NSMovieView problem
  • Next by Date: Data-aware controls (text fields, grids, etc.) for Cocoa?
  • Previous by thread: Cocoa Java: this class is not key value coding-compliant
  • Next by thread: Data-aware controls (text fields, grids, etc.) for Cocoa?
  • Index(es):
    • Date
    • Thread