• 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
Why [NSApp run] is required for this cocoa application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Why [NSApp run] is required for this cocoa application
      • From: j o a r <email@hidden>
  • Prev by Date: minimization routine
  • Next by Date: Re: Why [NSApp run] is required for this cocoa application
  • Previous by thread: Re: minimization routine
  • Next by thread: Re: Why [NSApp run] is required for this cocoa application
  • Index(es):
    • Date
    • Thread