• 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: Warning message using stringWithContentsOfFile:encoding:error:
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Warning message using stringWithContentsOfFile:encoding:error:


  • Subject: Re: Warning message using stringWithContentsOfFile:encoding:error:
  • From: Kyle Sluder <email@hidden>
  • Date: Sun, 28 Oct 2012 10:37:19 -0700

On Oct 28, 2012, at 10:23 AM, Paul Johnson <email@hidden> wrote:

> Thanks, Nick and Gary. You are absolutely right. I found 'error' is being
> defined in a 3rd-party framework I'm using.
>
> Then there is the question of how to work around this, so I can use the
> NSString class method. If you can suggest a solution I would be grateful.

In order of decreasing simplicity:

1. Don't include the errant header file from your source code.

2. Modify the header file to #undefine error at the end.

3. #undefine error in places you include the header file from.

No matter what you do, file a bug with the 3rd-party framework. Their macros should not leak.

--Kyle Sluder
_______________________________________________

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: Warning message using stringWithContentsOfFile:encoding:error:
      • From: Quincey Morris <email@hidden>
References: 
 >Warning message using stringWithContentsOfFile:encoding:error: (From: Paul Johnson <email@hidden>)
 >Re: Warning message using stringWithContentsOfFile:encoding:error: (From: Nick Zitzmann <email@hidden>)
 >Re: Warning message using stringWithContentsOfFile:encoding:error: (From: Paul Johnson <email@hidden>)
 >Re: Warning message using stringWithContentsOfFile:encoding:error: (From: "Gary L. Wade" <email@hidden>)
 >Re: Warning message using stringWithContentsOfFile:encoding:error: (From: Paul Johnson <email@hidden>)

  • Prev by Date: Re: Warning message using stringWithContentsOfFile:encoding:error:
  • Next by Date: Re: Warning message using stringWithContentsOfFile:encoding:error:
  • Previous by thread: Re: Warning message using stringWithContentsOfFile:encoding:error:
  • Next by thread: Re: Warning message using stringWithContentsOfFile:encoding:error:
  • Index(es):
    • Date
    • Thread