• 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: Running a sheet (threads)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Running a sheet (threads)


  • Subject: Re: Running a sheet (threads)
  • From: j o a r <email@hidden>
  • Date: Wed, 16 Apr 2003 09:27:10 +0200

The whole point of sheets is that they are document (window) modal and not application modal - ie. they should not block your main thread.

You can NOT do something like this (like you can do with app modal dialogs):

if ([NSApp beginSheet:...] == NSOkButton)
{

}

...because as you point out, it returns immediately. You need to wait with whatever it is that you want the user to decide until after the sheet is closed, and then handle this in the method specified by the "didEndSelector".

Read the documentation, check the sample code and tutorials, search the mailing list archives, etc.

j o a r

On Wednesday, Apr 16, 2003, at 09:11 Europe/Stockholm, Francisco Tolmasky wrote:

The problem is, the sheet is threaded or something, because it does not
way for the sheet to go away before it gets to the return. Can someone
help me figure out what to do instead? I know that running
NSbeginAlertSheet() achieves this somehow so it must be doable.
_______________________________________________
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: 
 >Running a sheet (threads) (From: Francisco Tolmasky <email@hidden>)

  • Prev by Date: Re: OSType
  • Next by Date: File formats in Cocoa
  • Previous by thread: Running a sheet (threads)
  • Next by thread: File formats in Cocoa
  • Index(es):
    • Date
    • Thread