Why [NSApp run] is required for this cocoa application
Why [NSApp run] is required for this cocoa application
- Subject: Why [NSApp run] is required for this cocoa application
- From: "prashant sharma" <email@hidden>
- Date: 24 Aug 2005 11:26:34 -0000
Hi,
In my cocoa application, i created an observer for notifications from NSWorkspace notification center. I am not interacting with window server in any way. I want that i should be able to create a simple NSThread that should keep running and my observor should catch all the notifications at workspace notification center.
My question is why do we need NSApp run method in this case. I tried creating a thread and putting it in while(1) loop but thread came out of the loop after iterating over it for some time. Whole thing works fine if i use NSApp run method.
I am confused that why we need to call run.
Regards,
Prashant
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden