Re: wait for sheet result
Re: wait for sheet result
- Subject: Re: wait for sheet result
- From: Jerry Krinock <email@hidden>
- Date: Thu, 7 Jan 2010 21:24:06 -0800
The Sheet Programming Guide notes that Cocoa does not support nested (or "piled on top of one another") sheets, and states that your app should make sure this never happens, but doesn't give you any assistance in doing so. Given that sheets frequently present errors or other unexpected results, we really need a means for queueing multiple sheets, in the **unlikely** event that one's app should ever need to present two sheets to the user in rapid succession. Hey, I know it's not pretty, but one should design to handle the corner cases.
On 2010 Jan 07, at 09:57, Rainer Standke wrote:
> What I am doing now instead, is to put each item into an array as it becomes available, then I call a new method that looks at the array and if there is anything in it will present the sheet for the first item. It also removes the first item from the array.
>
> Then the method that runs when the sheet is dismissed calls the above method again, which will present the sheet for the next item, or if there is no item left in the array will simply do nothing.
I wrote a class a few months ago that, if I recall correctly, does the same thing. Maybe the third person who needs to do queue sheets someday will get off to a quicker start with this ...
Attachment:
SSYSheetManager.zip
Description: Zip archive
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden