Reputation: 5323
I have a time consuming process which runs with an NSOperation. I now need user's choice to choose between different subprocesses. I need to stop the process until the user respond to the question.
How can I do this from an NSOperation?
Thanks
Upvotes: 0
Views: 271
Reputation: 830
Perhaps in the method where you are creating the NSAlert, you can have assert([NSThread isMainThread]) at the top of the method and I think that this will assure that this method get executed on the main thread. I hope this helps!
Upvotes: -1
Reputation: 7272
It should just be a matter of creating an NSAlert and calling runModal
on it, making sure you're on the main thread. Have you tried that?
Upvotes: 1