• 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
Problem In Accessing NSDistantobject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problem In Accessing NSDistantobject


  • Subject: Problem In Accessing NSDistantobject
  • From: Abdul Sattar <email@hidden>
  • Date: Wed, 9 Jan 2008 10:10:07 +0530

Hello All,

I have created an application which uses Bonjour and Distributed Object (DO)to share files across the systems connected to the LAN, I have an issue with DO connection.
That is I have created a NSConnection in a thread (say THREAD 1), and get the mProxy (server vended object) using the call [connection rootproxy] in the same thread.But when try to use mProxy in another thread or in main thread, it raises an exception saying "NSDistantObject access attempted from another thread", documentation says this is due to my attempt to use mProxy which is created in another thread (THREAD 1).


So what I have to do is keep running the THREAD 1 for long , and send all subsequent function calls to mProxy in the same thread(As I dont want to create separate thread and separate nsconnection for each function call to mProxy, instead use the same thread THREAD 1 for all the time.).

Can anybody please tell me, how to send request to mProxy (in my case) to execute remote methods using single thread which keeps running, or sending request for invoking a method to already running thread or Any alternate way for my above problem (my be sample code).

Please correct me if I am doing anything wrong in my above explained scenario.

Thanks in advance.

With Regards,
Abu



-----------------------------------------------
Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please 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: Problem In Accessing NSDistantobject
      • From: Ken Thomases <email@hidden>
    • Re: Problem In Accessing NSDistantobject
      • From: Mike Bellerby <email@hidden>
  • Prev by Date: Re: Window close button issue in Leopard
  • Next by Date: Re: Trapping user shutdown/logout/restart in Cocoa/Foundation tool
  • Previous by thread: Re: Observing NSBrowser
  • Next by thread: Re: Problem In Accessing NSDistantobject
  • Index(es):
    • Date
    • Thread