[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ????stringWithContentsOfFile????
From: |
reuss |
Subject: |
Re: ????stringWithContentsOfFile???? |
Date: |
Tue, 17 Jun 2003 15:36:55 GMT |
User-agent: |
Pan/0.11.2 (Unix) |
Ok, thanks, I tried it before. My problem is that my variable stays always null
(w printf) or nil (w NSLog), but it should contain a 199 kb plain
textfile and for this reason, I thougth that I should initialise my
variable. I really dont understand what happens with my text
file....there is maybe a size limit? I dont think so...Then?
tkx in advance, again
br
andras reuss
On Tue, 17 Jun 2003 16:44:49 +0200, Adam Fedor wrote:
> reuss wrote:
>> What is wroing with that?
>> NSString *aLongText=[[NSString alloc]stringWithContentsOfFile:
>> @"/path/aFile"];
>>
>>
> alloc and stringWithContentsOfFile: are creation methods. You can only
> create an object once. Try either
>
> aLongText=[NSString stringWithContentsOfFile: @"/path/aFile"];
>
> or
>
> aLongText=[[NSString alloc] initWithContentsOfFile: @"/path/aFile"];