• 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: PreferencePane and NSDistributedNotification
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PreferencePane and NSDistributedNotification


  • Subject: Re: PreferencePane and NSDistributedNotification
  • From: Mark Munz <email@hidden>
  • Date: Thu, 5 Feb 2004 16:16:37 -0700

Although less "pure Cocoa" -- you could try using Apple events. Register an EventHandler in your preference pane and have your faceless app send an event to it when it's set up.

I use a similar approach between my faceless app and it's clients (which may or may not be Cocoa apps).

HTH,

Mark Munz

Hi,

I'm writing a 2-part app. One part is a PreferencePane that resides in System Preferences and the other is faceless (NSUIElement).

Among other things, I need to launch the faceless part from the PreferencePane, and once the faceless part is launched, the UI on the PreferencePane needs to be updated. To accomplish the later, I registered for notifications from NSWorkspace (NSWorkspaceDidLaunchApplicationNotification and NSWorkspaceDidTerminateApplicationNotification) and that worked fine until I made the faceless part NSUIElement. NSWorkspace apparently don't send out launch and terminate notifications for NSUIElement apps.

After some head-scratching, I came up with the idea of manually posting distributed notifications from the faceless part. So I register for distributed notifications from the preference pane. But the notifications just went unnoticed.

What's up with that? Can't preference pane plug-ins receive distributed notifications? Any suggestions for other ways to communicate from the faceless part back to the preference pane (distributed notifications work just fine the other direction)?

Thanks.

-Jay Teo
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >PreferencePane and NSDistributedNotification (From: Jay Teo <email@hidden>)

  • Prev by Date: Re: Unwanted retain
  • Next by Date: Re: List-etiquette (was: RETRIEVING AN ARRAY ENTRY FROM AN ARRAY)
  • Previous by thread: Re: PreferencePane and NSDistributedNotification
  • Next by thread: NSTableView autosave doesn't work?
  • Index(es):
    • Date
    • Thread