• 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: importing tab-delimited table (newbie)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: importing tab-delimited table (newbie)


  • Subject: Re: importing tab-delimited table (newbie)
  • From: Chris Hanson <email@hidden>
  • Date: Sat, 5 Feb 2005 18:00:53 -0800

On Feb 5, 2005, at 2:14 PM, Daniel Child wrote:
I am wondering how to get tab-delimited data into one of the collection classes. I have lists of data like this:

Since you control the input file, this will be pretty easy.

You can read the file into a string, use -[NSString componentsSeparatedByString:] to chop that into an NSArray containing one string per line, and use it again to chop each line string into an NSArray containing one string per column.

As you're doing this you can build up any kind of object model you need in your application.

Where things get complicated is if you need to handle variations in file formats. But since you control it all in this situation, the above should be sufficient.

  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: importing tab-delimited table (newbie)
      • From: Mont Rothstein <email@hidden>
References: 
 >importing tab-delimited table (newbie) (From: Daniel Child <email@hidden>)

  • Prev by Date: Re: NSMenuValidation properly
  • Next by Date: distributed builds with different kernel versions error
  • Previous by thread: Re: importing tab-delimited table (newbie)
  • Next by thread: Re: importing tab-delimited table (newbie)
  • Index(es):
    • Date
    • Thread