• 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
Re: newbie question....reading from flat file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >newbie question....reading from flat file (From: Martha Espinosa <email@hidden>)

  • Prev by Date: GLUT and nib files, creates more than one app on 10.2
  • Next by Date: HEAD request using NSURLConnection
  • Previous by thread: RE: newbie question....reading from flat file
  • Next by thread: newbie question....reading from flat file
  • Index(es):
    • Date
    • Thread