I'm having an unusual problem with an NSFileHandle. I'm creating an NSFileHandle and initializing it with a file descriptor that's actually a network socket. I'm able to send and receive data using it and it works fine. Then, I pass the NSFileHandle instance as the first argument of an NSInvocation call

[invocation setArgument:fh atIndex:2];

When I invoke the invocation, it calls my method with the file handle as the first argument, exactly as it's supposed to, BUT, the file handle doesn't work. I get the following message in the console when my code tries to actually use it:

*** +[NSConcreteFileHandle writeData:]: unrecognized selector sent to class 0xa014ba80

The weird thing is, if I call:

[invocation target] performSelector:[invocation selector] withObject:fh];

it works just fine.

Does anyone have any idea what might be going on here? I've tried creating a new NSFileHandle and initializing it with the descriptor taken from the first argument, and I get the same result doing that. I'm able to work around the problem, but I'd still like to know if I'm doing something wrong.

TIA for any help anyone can offer.
Jeff
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to