• 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
Re: NSWindow
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSWindow


  • Subject: Re: NSWindow
  • From: Daryn <email@hidden>
  • Date: Sat, 18 Jan 2003 21:11:40 -0600

Take a look at the full list of delegate methods. I'd just the following changes to earlier suggested code:

- (BOOL)windowShouldClose:(NSNotification *)notification
{
NSWindow *windowAboutToClose = [notification object];
BOOL shouldClose = YES;

if (windowAboutToClose == myWindow)
[NSApp beginSheet:mySavePanel modalForWindow:myWindow
modalDelegate:self didEndSelector:@selector(sheetDidEnd:)
contextInfo:myWindow
];
shouldClose = NO;
}

return shouldClose;
}

- (void)sheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode
contextInfo:(void *)contextInfo
{
// handle the return somehow
[(NSWindow *)contextInfo close];
}

On Saturday, January 18, 2003, at 03:29 PM, Matis Schotte wrote:

hi,
another problem: when i close the window, the dialog appears, but the windows disappears then with the dialog ... what should i do??
thx @ all helpers .. :)
smat _______________________________________________
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.


Daryn
_______________________________________________
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.

References: 
 >Re: NSWindow (From: Matis Schotte <email@hidden>)

  • Prev by Date: ANN: GNUMail.app / Pantomime 1.1.0pre1
  • Next by Date: Re: Why does this leak memory?
  • Previous by thread: Re: NSWindow
  • Next by thread: NSMutableDictionary Error
  • Index(es):
    • Date
    • Thread