Re: Running a sheet (threads)
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.