Re: NSTableView question
Re: NSTableView question
- Subject: Re: NSTableView question
- From: Jeremy French <email@hidden>
- Date: Tue, 15 Feb 2005 12:20:40 -0500
From you question, I'm assuming that the table's data source array
simply contains NSString objects for the names, instead of instances of
a data model class.
Why don't you create a data model class that would a have a "name"
field as well as a "personID" field. The "personID" field would hold an
unique value (perhaps a number); no two instances of the data model
class would have the same "personID" value. Your table's data source
array would contain instances of the data model class (instead of
simply NSString). Each of the "thousands of names" would become
thousands of instances of the model class, and you would have a unique
identifier for each name. Data model instance objects could have
duplicated names, but the "personID" would always be unique and never
repeated.
On Feb 15, 2005, at 4:11 AM, Peter Karlsson wrote:
I have a tableview with one column. In that column I have thousands of
names. I need a way to give these names id's.
_______________________________________________
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