NSApp beginSheet: behaving oddly
NSApp beginSheet: behaving oddly
- Subject: NSApp beginSheet: behaving oddly
- From: <email@hidden>
- Date: Mon, 28 Feb 2005 11:31:20 +0000
Actually, the fact that it's behaving at all is what has me stumped.
Very simple setup. The user clicks a button which displays an NSSavePanel. If the user clicks the OK button:
if (result = NSOKButton)
Several things will happen. One of those is a sheet that drops down to track the processing of files. It is called, inside the if function, as such:
[NSApp beginSheet:progressSheet modalForWindow:mainWindow modalDelegate:self didEndSelector:NULL contextInfo:nil];
The strange thing is, if I click the button to get the save panel, then click the Cancel button, the sheet drops down and then goes away.
The sheet is started and ended:
[progressSheet orderOut:nil]
[NSApp endSheet:progressSheet];
all inside the if block. So why on earth am I even seeing it if I click the Cancel button? That would mean that result DOES NOT equal NSOKButton, so my application shouldn't be starting a sheet at all. If I can provide more code, let me know. This is very strange.
James
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden