NSArray problem for a newbie
NSArray problem for a newbie
- Subject: NSArray problem for a newbie
- From: Ufficio Tecnico Metagraphics <email@hidden>
- Date: Wed, 30 Jul 2003 18:27:50 +0200
Hi to all,
I'm a complete newbie to Cocoa and Obj-C.
I'm trying to write in a NSTextView an array like follow:
#import "byip.h"
@implementation byip
- (IBAction)connect_ip:(id)sender
{
NSString * file = @"/Library/Apache2/logs/access_log";
NSString * path = [file stringByStandardizingPath];
NSString * source = [NSString stringWithContentsOfFile:path];
NSString * name = [path lastPathComponent];
//NSMutableArray * [[IpArray alloc]init];
NSMutableArray * ip = [[source
componentsSeparatedByString:@"\n"]retain];
int count = [ip count];
int i;
for (i = 0; i < count; i++)
{
[by_ip insertText:[NSString stringWithFormat:@"%i: \n",[ip
objectAtIndex:i]]];
}
[logs_ip setObjectValue :[NSString stringWithFormat:name]];
//[ip release];
}
@end
All seems to work properly with NSLog, but NSTextView doesn't recognize
NSLog....
Can someone help me please?
Thank you very much for help
_______________________________________________
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.