AP.
AP.

Reputation: 5323

Modal NSAlert from NSOperation

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

Answers (2)

tams
tams

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

Francis McGrew
Francis McGrew

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

Related Questions