• 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
Re: help with closing file handle
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help with closing file handle


  • Subject: Re: help with closing file handle
  • From: Nir Soffer <email@hidden>
  • Date: Sat, 9 Feb 2008 15:22:05 +0200


On Feb 9, 2008, at 14:14, Daniel Luis dos Santos wrote:

I have found the solution to the problem. It seems that I have to pass a mutable string with the path to the file handle's factory method. Looking back at the output of the error, now it seems pretty obvious. My worry now is that I am new to the macos development environment, and I am programming while looking at the documentation I have installed in my machine. I have tiger, but upgraded to xcode 2.5 from the version supplied with OSX. The documentation for the NSFileHandle class shows me in its signature an NSString as its argument.
Is this common in apple API's or am I looking at the wrong document's ?

You must show your code to get help.

I guess that you pass an autoreleased string to the file handle, and the exceptions you get are raised when the file handle try to send a message to the object you passed, which does not exists any more. The same address is used now by another object, (an NSArray) which complain about unrecognized selectors. This is a very common error for Cocoa beginners.

You should read carefully the memory management guidelines: http:// developer.apple.com/documentation/Cocoa/Conceptual/MemoryMgmt/Tasks/ MemoryManagementRules.html


Best Regards,

Nir Soffer

_______________________________________________

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: help with closing file handle
      • From: "Shawn Erickson" <email@hidden>
References: 
 >help with closing file handle (From: Daniel Luis dos Santos <email@hidden>)
 >Re: help with closing file handle (From: "Kyle Sluder" <email@hidden>)
 >Re: help with closing file handle (From: Daniel Luis dos Santos <email@hidden>)

  • Prev by Date: Re: Problems getting NSURLConnection to work
  • Next by Date: Re: What's the story with OSAScriptController and OSAScriptView.
  • Previous by thread: Re: help with closing file handle
  • Next by thread: Re: help with closing file handle
  • Index(es):
    • Date
    • Thread