• 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: wait for sheet result
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait for sheet result


  • Subject: Re: wait for sheet result
  • From: Rainer Standke <email@hidden>
  • Date: Thu, 7 Jan 2010 09:57:35 -0800

Thanks again, Graham. This was actually the key to solving it. I had been hung up on the idea to present the sheet for each item as the item became available, i.e. within the same loop that generates the items. Which, of course, lead to the run-away train situation.

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.

Rainer


On Jan 6, 2010, at 22:33 , Graham Cox wrote:


On 07/01/2010, at 5:10 PM, Rainer Standke wrote:

How do I go about solving this?


This is down to the logic of your app. While a sheet is up, events are being processed as normal, so presumably you are relying on the event loop to process the items. You'll need to rework your design so that each item can be processed in response to some other thing occurring (like the previous one completing) rather than using the event loop.

Sorry this is vague, but so's your question. If you show the code of how you are processing the items, better/more concrete advice can probably be offered!

--Graham



_______________________________________________

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


  • Follow-Ups:
    • Re: wait for sheet result
      • From: Jerry Krinock <email@hidden>
References: 
 >wait for sheet result (From: Rainer Standke <email@hidden>)
 >Re: wait for sheet result (From: Graham Cox <email@hidden>)

  • Prev by Date: Subject: Re: NSEvent timestamp is zero
  • Next by Date: Re: iPhone: validate a NSString for US zipcode
  • Previous by thread: Re: wait for sheet result
  • Next by thread: Re: wait for sheet result
  • Index(es):
    • Date
    • Thread