[MacRuby-devel] Single Column Table View with Core Data backed Custom Cell View?

Haris Amin aminharis7 at gmail.com
Wed Dec 7 23:31:14 PST 2011


Hey Guys,

I have a Core Data entity called Email all set and ready to go. Following
Matt's example from the book, I was able to create a regular old
NSTableView and bound the Core Data Email entity's values to each column in
the tableview. This works great. What I'm now trying to do is make a single
column tableview where each row will display a custom cell view constructed
from my Core Data Email object.

With me so far? :) Basically, if you look at the Mail app from OS X Lion,
I'm trying to create that side bar single column tableview where each email
message has a custom table cellview showing the from, to, subject, and
summary for each Core Data email values. With a regular old tableview this
is easy, I'm just a little lost as to how to get a single column table view
to render a custom cell view that uses Core Data binding to match my Email
NSArray Controller.

This is a symbolic representation of what i'm trying to achieve:

NSTableView ( 1 column)
  > NSColumn (bound to my CoreData Email entity)
     > NSTableCellView ( I want this to show the actual text fields for the
bound coredata object for that row i.e. email.to, email.from,
email.subject, etc.)

A little lost and any help would be much appreciated. Thanks :)

Haris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20111208/54a82d23/attachment.html>


More information about the MacRuby-devel mailing list