• 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
NSApp beginSheet: behaving oddly
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSApp beginSheet: behaving oddly
      • From: Douglas Norton <email@hidden>
  • Prev by Date: Re: Where is plus arrow cursor?
  • Next by Date: Re: NSApp beginSheet: behaving oddly
  • Previous by thread: Solved: Append to file with NSString writeToFile:
  • Next by thread: Re: NSApp beginSheet: behaving oddly
  • Index(es):
    • Date
    • Thread