NSConnection returning nil proxy, problem solved.
NSConnection returning nil proxy, problem solved.
- Subject: NSConnection returning nil proxy, problem solved.
- From: Chris DeSalvo <email@hidden>
- Date: Tue, 11 Jun 2002 08:47:58 -0700
With some amazingly helpful offline assistance from Bill Bumgarner my
multi-threaded worker/ui app is chugging along quite nicely.
You may recall that I was having a problem with NSConnection rootProxy:
throwing an illegal access exception saying that I was trying to access data
across a thread boundary. Ugh.
I had properly set up the read/write ports for the NSConnection in the main
thread of my app, which drives my UI. However, when I was calling
connectionWithReceivePort:sendPort: on that NSConnection I wasn't swapping
the order of the arguments that I had used to create it.
So, when I was calling rootProxy: I was always getting the local,
main-thread accessor for my UI controller object. After swapping the
arguments I started getting the remote proxy and everything worked
perfectly.
Thanks again to Bill and to the others who contributed comments.
Cheers,
Chris
_______________________________________________
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.