Fixed the 10.4 deprecation of -resolve. Will call resolveWithTimeout: in 10.4
authorKent Sutherland <ksuther@ithinksw.com>
Mon, 2 May 2005 00:00:22 +0000 (00:00 +0000)
committerKent Sutherland <ksuther@ithinksw.com>
Mon, 2 May 2005 00:00:22 +0000 (00:00 +0000)
NetworkController.m

index b191c6d..c05d1e6 100755 (executable)
@@ -289,7 +289,12 @@ static NetworkController *sharedController;
     ITDebugLog(@"Found service named %@.", [aNetService name]);
     [remoteServices addObject:aNetService];
     [aNetService setDelegate:self];
-    [aNetService resolve];
+       //Figure out if it responds to the 10.4 method
+       if ([aNetService respondsToSelector:@selector(resolveWithTimeout:)]) {
+               [aNetService resolveWithTimeout:5.0];
+       } else {
+               [aNetService resolve];
+       }
     if (!moreComing) {
         [[NSNotificationCenter defaultCenter] postNotificationName:@"ITMTFoundNetService" object:nil];
     }