|
From: | Richard Frith-Macdonald |
Subject: | Re: ????stringWithContentsOfFile???? |
Date: | Tue, 17 Jun 2003 15:32:08 +0100 |
On Tuesday, June 17, 2003, at 12:52 pm, reuss wrote:
What is wroing with that? NSString *aLongText=[[NSString alloc]stringWithContentsOfFile: @"/path/aFile"]; I got:Uncaught exception NSInvalidArgumentException, reason: GSPlaceholderString(instance) does not recognize stringWithContentsOfFile:
[NSString alloc] creates an instance of the NSString class, and +stringWithContentsOfFile: is not a method that instances of NSString implement ... it's a method that the *class* NSString implements, and it performs the creation of a new instance itsself.
[Prev in Thread] | Current Thread | [Next in Thread] |