Re: Why won't my file load?
Re: Why won't my file load?
- Subject: Re: Why won't my file load?
- From: Chris Gehlker <email@hidden>
- Date: Tue, 12 Feb 2002 19:02:48 -0700
On 2/12/02 3:06 PM, "Chris Gehlker" <email@hidden> wrote
>
I'm working on a little IDE for Ruby but I can't get saved files to reload.
>
Here is my code:
>
>
- (BOOL)loadDataRepresentation:(NSData *)data ofType:(NSString *)aType
>
{
>
NSString *test;
>
NSString *aString = [[NSString alloc] initWithData:data
>
>
encoding:NSASCIIStringEncoding];
>
NSLog(@"%@", aString); // a nice string with whatever was saved
>
[sourceView setString:aString];
>
test = [sourceView string];
>
NSLog(@"%@", test); // always says: (null)
>
[aString release];
>
if (test == nil)
>
return NO;
>
return YES;
>
}
>
>
Sending setString to NSTextViews is working elsewhere in the program so I'm
>
stumped. Any help apprecieated.
Never mind. I didn't realize that this runs before the nib loads.
--
Some people say Windows users have an inferiority complex.
That's not true. It's not a complex.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.