• 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: remote proxy object somehow not correct
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: remote proxy object somehow not correct


  • Subject: Re: remote proxy object somehow not correct
  • From: "William Zumwalt" <email@hidden>
  • Date: Mon, 15 Jan 2007 21:59:00 -0600

I took this example from the documentation on DO's and this is almost
exactly what they have in there. And I do reverse the ports when they
are put into the NSArray. I think you can seem them in the first post
in the +startNetworkThreadWithTag method. I just add them to the array
in backwards order.


I think you want to reverse these ports. You may also have some memory management issues to work out, since +startNetworkThreadWithTag returns a retained instance.


I'm just trying to call a method on the main thread so I can pass the thread instance to it for later use, but it doesn't call the main threads setServer method at all. That's why I think there is something wrong w/ the rootProxy object I've set up.

Generally, you should wrap -[NSConnection rootProxy] in an exception
handler and catch possible timeouts or other exceptions, as shown in
the documentation.  It's not really clear what you're doing, other
than that.  You're sending [[serverConnection rootProxy]
setServer:tag:] on your worker thread, and using class objects as root
objects.  This final line is equivalent to just doing [serverObject
setServer:serverObject tag:serverTag], which is probably not what you
want.

If you're just getting started with DO, I'd recommend trying a really
trivial example, since the documentation is pretty thin.

I am using the code in the "communication with distributed objects" on this page, so my code should do what is listed there.

http://developer.apple.com/documentation/Cocoa/Conceptual/Multithreading/index.html
_______________________________________________

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: remote proxy object somehow not correct
      • From: "Adam R. Maxwell" <email@hidden>
References: 
 >remote proxy object somehow not correct (From: "William Zumwalt" <email@hidden>)
 >Re: remote proxy object somehow not correct (From: "Adam R. Maxwell" <email@hidden>)

  • Prev by Date: Re: remote proxy object somehow not correct
  • Next by Date: Re: remote proxy object somehow not correct
  • Previous by thread: Re: remote proxy object somehow not correct
  • Next by thread: Re: remote proxy object somehow not correct
  • Index(es):
    • Date
    • Thread