Type Method

proxyWithTarget:connection:

Returns a remote proxy for a given object and connection, creating the proxy if necessary.

Declaration

+ (id)proxyWithTarget:(id)target connection:(NSConnection *)connection;

Parameters

remoteObject

An object in another thread or another application’s address space.

aConnection

The connection to set as the NSConnection object for the returned proxy—it should have been created using the NSConnection connectionWithRegisteredName:host: class method.

Return Value

A remote proxy for remoteObject and aConnection, creating the proxy if necessary

Discussion

A remote proxy cannot be used until its connection's peer has a local proxy representing remoteObject in the other application.

See Also

Creating a Remote Proxy

- initWithTarget:connection:

Initializes a newly allocated NSDistantObject as a remote proxy for remoteObject, which is an id in another thread or another application’s address space.

Deprecated