• 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: fopen() works only in debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fopen() works only in debugger


  • Subject: Re: fopen() works only in debugger
  • From: Timothy Larkin <email@hidden>
  • Date: Sun, 4 Mar 2007 06:45:19 -0500


On Mar 3, 2007, at 10:02 PM, John C. Randolph wrote:


On Mar 3, 2007, at 2:16 PM, Timothy Larkin wrote:

I am working on a Foundation tool which calls fopen() from a class method. It runs correctly under the debugger.

Sounds like your code depends in some way on the current working directory. Also, why are you using fopen() instead of - dataWithContentsOfURL: or -stringWithContentsOfURL:?

Thanks for your response.

The path to fopen is absolute, and I am opening it for writing. I don't see how this can be affected by the working directory.

I am using fprintf instead of accumulating a string and writing it all at once because hundreds of writers are distributed throughout the program tree, and each is asked to write thousands of times. It seemed that having them write through a shared file stream would be quicker than mutating a string a hundreds of thousands of times.

--
Timothy Larkin
Abstract Tools
Caroline, NY

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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: fopen() works only in debugger
      • From: John Stiles <email@hidden>
References: 
 >fopen() works only in debugger (From: Timothy Larkin <email@hidden>)
 >Re: fopen() works only in debugger (From: "John C. Randolph" <email@hidden>)

  • Prev by Date: Re: Subclass of NSMutableDictionary hanging
  • Next by Date: Re: rotating an object around the center of a view
  • Previous by thread: Re: fopen() works only in debugger
  • Next by thread: Re: fopen() works only in debugger
  • Index(es):
    • Date
    • Thread