diff --git a/Source/NSDistantObject.m b/Source/NSDistantObject.m index 22c8a65d3..f7687ed89 100644 --- a/Source/NSDistantObject.m +++ b/Source/NSDistantObject.m @@ -766,6 +766,17 @@ enum return get_imp(GSObjCClass((id)self), aSelector); } +/** + *

Returns the method signature describing the arguments and return + * types of the method in the object referred to by the receiver + * which implements the aSelecto message. + *

+ *

This method may need to refer to another process (causing relatively + * slow network communication) and apprximately double the time taken for + * sending a distributed objects message, so you are advised to use the + * -setProtocolForProxy: method to avoid this occurring. + *

+ */ - (NSMethodSignature*) methodSignatureForSelector: (SEL)aSelector { if (_object != nil) @@ -864,6 +875,29 @@ enum } } +/** + *

A key method for Distributed Objects performance. This sets the + * a protocol that the distant object referred to by the proxy should + * conform to. When messages in that protocol are sent to the proxy, + * the proxy knows that it does not need to ask the remote object for + * the method siagnature in order to send the message to it, but can + * send the message straight away based on the local method signature + * information obtained from the protocol. + *

+ * + * if ([anObj isProxy] == YES) + * { + * [anObj setProtocolForProxy: @protocol(MyProtocol)]; + * } + * + *

It is highly recommended that you make use of this facility, + * but you must beware that versions of the compiler prior to 3.3 suffer a + * serious bug with respect to the @protocol directive. If the protocol + * referred to is not declared and implemented in the file where @protocol + * is used to refer to the protocol by name, a runtime error will occur + * when you try to use it. + *

+ */ - (void) setProtocolForProxy: (Protocol*)aProtocol { _protocol = aProtocol; diff --git a/Source/NSDistributedNotificationCenter.m b/Source/NSDistributedNotificationCenter.m index 2c1ac8fd4..15544b9f5 100644 --- a/Source/NSDistributedNotificationCenter.m +++ b/Source/NSDistributedNotificationCenter.m @@ -485,7 +485,7 @@ static NSDistributedNotificationCenter *netCenter = nil; /* * The following dummy class is here solely as a workaround for pre 3.3 * versions of gcc where protocols didn't work properly unless implemented - * in the source where the '@protocol()' directiver is used. + * in the source where the '@protocol()' directive is used. */ @interface NSDistributedNotificationCenterDummy : NSObject - (void) addObserver: (unsigned long)anObserver diff --git a/Tools/gdnc.m b/Tools/gdnc.m index b7e3a5be6..834abe307 100644 --- a/Tools/gdnc.m +++ b/Tools/gdnc.m @@ -93,7 +93,7 @@ ihandler(int sig) /* * The following dummy class is here solely as a workaround for pre 3.3 * versions of gcc where protocols didn't work properly unless implemented - * in the source where the '@protocol()' directiver is used. + * in the source where the '@protocol()' directive is used. */ @interface NSDistributedNotificationCenterDummy : NSObject - (oneway void) postNotificationName: (NSString*)name