• 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: NSTableView Problems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTableView Problems
      • From: Barry Fawthrop <email@hidden>
References: 
 >NSTableView Problems (From: Barry Fawthrop <email@hidden>)
 >Re: NSTableView Problems (From: Graham Cox <email@hidden>)

  • Prev by Date: Remove HTML Tags
  • Next by Date: Need some advice on multithreading
  • Previous by thread: Re: NSTableView Problems
  • Next by thread: Re: NSTableView Problems
  • Index(es):
    • Date
    • Thread