|Subject:||Re: Proper way of connecting to apps|
|Date:||Sun, 22 Jun 2003 08:58:21 +0100|
At first, thank you for your answer. Thing is, that I know all you have suggested me, but this does not solve the problem i am pointing at. I'll put something together here, instead of under-writing it.
1. is it somewhere explicitly stated, that using NSConnection is the official way how to get remote application object? I know, that with current implementation I can do that.
2. I think that using same namespace for application objects and distant object registered with NSConnection is not good. Another name server should be used for applications ... or betyter solutions is: same with separated namespace and interface for applications.
3. [NSWorkspace -launchApplication:] does not work correctly. The method returns immediately after executing application binary, i would expect it to wait until successfull application launch, so i can connect to it immediately and start communicating with it. Now I have to create a loop where I check whether application is running.
4. Following code is not making using application services attractive in any way:
myApp = [NSConnection rootProxyForConnectionWithRegisteredName:name host:nil];
[NSRunLoop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:0.5]];
MOREOVER, this code does not work correctly if i do not have application installed and i want to use its services (from other application). I can wait for application to be connected forever. Therefore this code is missing check for application presence, which should be done somehow with NSWorkspace.
Ho would you explain that anyone who would like to use application services has to write this long piece of code
(that has to be changed when application registration changes)?
|[Prev in Thread]||Current Thread||[Next in Thread]|