• 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
Distributed Objects
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Distributed Objects


  • Subject: Distributed Objects
  • From: "Gerriet M. Denkmann" <email@hidden>
  • Date: Mon, 27 Aug 2012 18:53:48 +0700

When I set up my server like:
    NSConnection *theConnection = [[NSConnection alloc] init];
	[ theConnection setRootObject: self ];
	BOOL ok = [theConnection registerName: @"someName" ];

Then a client is not able to get the rootProxy.

When I add this line:
	[[NSRunLoop currentRunLoop] run];
Then the client can connect, send messages and everything looks fine.
Only the Server app cannot do anything more, except serving clients.

The documentation says:

" In the main thread of an application based on the Application Kit, the run loop is already running, so there is nothing more to do to vend an object. In a secondary thread or an application that does not use theNSApplication object, you have to start the run loop explicitly to capture incoming connection requests and messages. This is usually as simple as getting the current thread’s NSRunLoop instance and sending it a run message".

So the line [[NSRunLoop currentRunLoop] run] should not be necessary.
What is going on?

10.8.1

Gerriet.

_______________________________________________

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: Distributed Objects
      • From: Kyle Sluder <email@hidden>
    • Re: Distributed Objects
      • From: Kyle Sluder <email@hidden>
    • Re: Distributed Objects
      • From: "Gary L. Wade" <email@hidden>
  • Prev by Date: Troubles with auto-layout
  • Next by Date: Re: text highlighting with CALayer and NSTextVew
  • Previous by thread: Troubles with auto-layout
  • Next by thread: Re: Distributed Objects
  • Index(es):
    • Date
    • Thread