Re: NSTableView Problems
Re: NSTableView Problems
- Subject: Re: NSTableView Problems
- From: Graham Cox <email@hidden>
- Date: Mon, 24 Nov 2008 10:55:44 +1100
On 24 Nov 2008, at 10:43 am, Graham Cox wrote:
[schedule addObject: [NSArray arrayWithObjects: @"TIME", filename,
length, nil]];
A further comment.
While managing your data this way is OK, and may fit your application
well, I personally wouldn't do it this way.
Instead, define an object class that has a filename, length and time
values as properties. Then your list becomes trivially easy to manage
as each related piece of data is always held together. In other words
a general-purpose array is not a good substitute for a custom object
that links the various bits of data together meaningfully.
You'll also find that driving a table view is much easier - the code
snippet I posted always works when you do it this way, provided your
write your property accessors correctly.
hth,
Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden