• 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 returning nil proxy, problem solved.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSSlider's mouseDown implementation
  • Next by Date: Re: [Q] Dev vs. Deployment builds
  • Previous by thread: newbie trouble with multiple nibs, menu's, runmodalforwindow and pasting
  • Next by thread: Is this a Bug With TabView control
  • Index(es):
    • Date
    • Thread