importing tab-delimited table (newbie)
importing tab-delimited table (newbie)
- Subject: importing tab-delimited table (newbie)
- From: Daniel Child <email@hidden>
- Date: Sat, 05 Feb 2005 12:14:58 -1000
Hi folks,
I am wondering how to get tab-delimited data into one of the collection
classes. I have lists of data like this:
a ㄚ a
ai ㄞ ai
an ㄢ an
ang ㄤ ang
ao ㄠ ao
cha ㄓㄚ zha
ch`a ㄔㄚ cha
chai ㄓㄞ zhai
ch`ai ㄔㄞ chai
etc.
(the three fields are Wade-Giles, Bopomofo, Pinyin)
and I want to store them in ways that I can search for correspondences
among the fields. I might have three dictionaries, for instance, with
keys for each of the columns. Then I could store the data in
NSTableView columns. But how do you import such data in the first place?
The -initWithContentsOfFile methods seem to assume plists
(XML-formatted) if I understand the documentation correctly. So whether
I use NSArray or NSDictionary to get the data, it is the same problem:
I don't have data in that format.
Naturally, I can use a WP to change the field and record delimiters to
anything else. But I need the right method to do the import. I spent a
lot of time looking and haven't found the approach I need. Any
suggestions? Thanks.
Daniel
_______________________________________________
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