Somebody may be able to provide clue here and save me a deal of time...

I'm intending using DO between a Foundation Tool and what is currently a normal Cocoa app. I have used DO before between 2 normal Cocoa apps (i.e. where NSApplication starts the run loop etc.) - that just worked first time with no problems, but a Foundation App probably needs a little more TLC.

Right now, I have some test code in my 'main' function that attempts to connect to a remote object. This seems to be able to produce an NSConnection (I provide a sendPort configured with IP and port of the remote socket/NSConnection, and receivePort is nil). However, when I attempt to get the 'distant object' proxy, the call never returns.

I'm trying to figure out how to get a handle on what's happening here, and there are a bunch of questions to work on: 1. If you manage to get a connection instance, does that mean the connection is established correctly?
2. What runloop apparatus do I need to have various pieces of this work?

So far, regarding (1), I have tried to connect to arbitrary ports on the remote machine, and indeed get different (expected) behaviour: an NSPortTimeoutException. So, I have reason to believe that when the NSConnection instance is returned, things should be set up correctly.

I'm beginning to think that (2) is where the issue lies. I've read that replies use a special NSConnectionReplyMode, and that might also explain why I can't even get the NSDistantObject from -[NSConnection rootProxy] at this time (because I run a runloop at the bottom of my main function).

Anyway, while I fiddle with trying to find a magic incantation and particularly, how I should configure my runloop in a foundation app to get DO to work (and then where it will work), someone might already have some insight into how to get this going.

Cheers

-- Luke


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to