Re: NSApp beginSheet: behaving oddly
Re: NSApp beginSheet: behaving oddly
- Subject: Re: NSApp beginSheet: behaving oddly
- From: Douglas Norton <email@hidden>
- Date: Mon, 28 Feb 2005 12:22:16 +0000
On 28 Feb 2005, at 11:31, <email@hidden> wrote:
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)
Did you mean to assign NSOKButton to result ??
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