Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-29 Thread Lee Ann Rucker
On Oct 28, 2012, at 11:03 AM, Quincey Morris wrote: > On Oct 28, 2012, at 10:37 , Kyle Sluder wrote: > >> No matter what you do, file a bug with the 3rd-party framework. Their macros >> should not leak. > > The thing that bothers me is why macros should be substituting into method > paramete

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread gweston
Quincey Morris wrote No matter what you do, file a bug with the 3rd-party framework. Their macros should not leak. The thing that bothers me is why macros should be substituting into method parameter names at all. It potentially brings *pieces* of method names into the global symbol namespa

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Jens Alfke
On Oct 28, 2012, at 11:03 AM, Quincey Morris wrote: > The thing that bothers me is why macros should be substituting into method > parameter names at all. The preprocessor barely knows anything about C syntax, let alone Obj-C. Remember, it’s running before the parser — all it gets is a strea

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Quincey Morris
On Oct 28, 2012, at 10:37 , Kyle Sluder wrote: > No matter what you do, file a bug with the 3rd-party framework. Their macros > should not leak. The thing that bothers me is why macros should be substituting into method parameter names at all. It potentially brings *pieces* of method names int

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Kyle Sluder
On Oct 28, 2012, at 10:23 AM, Paul Johnson 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 so

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Paul Johnson
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. On Sat, Oct 27, 2012 at 7:41 PM,

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Andy Lee
(Sorry again if the list gets this twice. I am going to strangle whoever thought it was a good idea to give me a me.com address as an alias for my mac.com address -- AND have Mail.app use one when I meant the other.) On Oct 28, 2012, at 12:04 PM, Andy Lee wrote: > I Googled "Rf_error" and ther

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-28 Thread Andy Lee
(Sorry if the list gets this twice. I am going to strangle whoever thought it was a good idea to give me a me.com address as an alias for my mac.com address.) On Oct 27, 2012, at 6:04 PM, Paul Johnson wrote: > I get a compiler warning message at the following line of code: > > NSString *text =

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Gary L. Wade
What you think you're calling is the NSString class method +stringWithContentsOfFile:encoding:error: but due to an unexpected definition, you're actually calling the NSString class method +stringWithContentsOfFile:encoding:Rf_error: Apple does not have a publicly defined selector of that name,

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Paul Johnson
Nick, I can't find any headers that #define 'Rf_error'. The warning message seems to be complaining about assigning to the type 'NString *' when type 'id' is expected, though. I'm not sure where Rf_error is defined, but it must be in the Cocoa headers. Thanks for your reply. On Sat, Oct 27, 201

Re: Warning message using stringWithContentsOfFile:encoding:error:

2012-10-27 Thread Nick Zitzmann
On Oct 27, 2012, at 4:04 PM, Paul Johnson wrote: > I get a compiler warning message at the following line of code: > > NSString *text = [NSString stringWithContentsOfFile:fullPath encoding: > NSUTF8StringEncoding error:&error]; > > The warning message is: > > Class method '+stringWithContents