• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSFileHandle / NSConcreteFileHandle problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSFileHandle / NSConcreteFileHandle problem


  • Subject: NSFileHandle / NSConcreteFileHandle problem
  • From: Jeff LaMarche <email@hidden>
  • Date: Sun, 30 Mar 2008 15:30:11 -0400

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 (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSFileHandle / NSConcreteFileHandle problem
      • From: "Boaz Stuller" <email@hidden>
    • Re: NSFileHandle / NSConcreteFileHandle problem
      • From: Jeff LaMarche <email@hidden>
  • Prev by Date: Re: Thread safe?
  • Next by Date: Re: NSFileHandle / NSConcreteFileHandle problem
  • Previous by thread: Re: How to set color file labels?
  • Next by thread: Re: NSFileHandle / NSConcreteFileHandle problem
  • Index(es):
    • Date
    • Thread