• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSArray problem for a newbie
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: NSArray problem for a newbie
      • From: Dylan Adams <email@hidden>
    • Re: NSArray problem for a newbie
      • From: Stéphane Sudre <email@hidden>
  • Prev by Date: exception in class derived from NSMutableDictionary
  • Next by Date: Re: exception in class derived from NSMutableDictionary
  • Previous by thread: Re: exception in class derived from NSMutableDictionary
  • Next by thread: Re: NSArray problem for a newbie
  • Index(es):
    • Date
    • Thread