views:

69

answers:

0

The same code is running on different computers. One program works well but the other has an error. I'm doing a sending and receiving program using NSNetservice.

my GUI contains a textbox(text messaging), textview(for available domain), 3 button(search,connect, send). After I have search, I click on the connect button with this code:

-(IBAction)connect:(id)sender
{
    NSNetService *remoteService = servicesController.selectedObjects.lastObject;
    remoteService.delegate = self; 
    [remoteService resolveWithTimeout:30];
}

The error is : "Could not change delegate of socket" Both program run at a same version Mac os x and xcode.