Re: newbie question....reading from flat file
Re: newbie question....reading from flat file
- Subject: Re: newbie question....reading from flat file
- From: Brian Ganninger <email@hidden>
- Date: Thu, 22 Jan 2004 16:30:52 -0600
Why not use a key-value plist & create a dictionary and just use a
keyEnumerator and a while loop to add the objects to the table model?
(off topic suggestion)
As to the string separating question, the following is from the Apple
docs on NSString and it's methods, specifically
componentsSeparatedByString: , which would be exactly what you are
looking for unless your URLs or objects contain commas, at which point
you'll have to search the cocoa.mamasam.com archives for great
discussions on how to use string scanners.
// from the apple example [verbatim]
NSString *list = @"wrenches, hammers, saws";
NSArray *listItems = [list componentsSeparatedByString:@", "];
HTH,
Brian
On Jan 22, 2004, at 2:36 PM, Martha Espinosa wrote:
Hi again,
Okay, I have started my "software update" application. I need some
guidance. I created a table in project builder and want to use a flat
file with information separated by commas stored up on a network
server. I want to get the information from the flat file and store it
in the table. I know you can use NSScanner and NSString. Can someone
be nice enough and help me figure this out?
Thanks in Advance
-ME
_______________________________________________
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.
_______________________________________________
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.