• 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
NSConnection in modal windows
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSConnection in modal windows


  • Subject: NSConnection in modal windows
  • From: Tony Tung <email@hidden>
  • Date: Mon, 11 Dec 2006 20:26:07 -0800

Hi all,

I'm trying to create a plugin for aperture. In my plugin, I spawn a thread, and use a pair of NSConnections? to communicate between the threads. The thread spawning goes fine. But when the worker thread tries to retrieve the parent object through [serverConnection rootProxy], the code hangs.

This code works fine stand-alone (i.e., not inside aperture). I figure it has something to do with the plugin window being modal.

Other things I considered:

1) inside the main thread, I call this: [workerConnection addRunLoop: [NSRunLoop currentRunLoop]]; result: no difference

2) inside the main thread, I call this: [[NSRunLoop currentRunLoop] configureAsServer]; result: no difference

3) maybe I need to send the NSConnenction? a addRequestMode message. I tried getting the mode of the main thread using this: DTCLog? (@"current mode: %@", [[NSRunLoop currentRunLoop] currentMode]);

output: current mode: (null)

any ideas?

P.S. I'm new to objc/cocoa, so please excuse me if this is a stupid question. thanks!


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSConnection in modal windows
      • From: James Bucanek <email@hidden>
  • Prev by Date: Re: Revert to factory settings: how to do it?
  • Next by Date: OutlineView with multiple roots.
  • Previous by thread: Re: Reporting Wizard in Cocoa
  • Next by thread: Re: NSConnection in modal windows
  • Index(es):
    • Date
    • Thread