NSConnection in modal windows
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