开发者

NSDictionaryController and image

开发者 https://www.devze.com 2023-04-06 11:12 出处:网络
I am referring to this example code. I am trying to display imag开发者_开发知识库e in the first column at where lastName is displaying, but unfortunately I can\'t.I think you can do it in two ways-

I am referring to this example code. I am trying to display imag开发者_开发知识库e in the first column at where lastName is displaying, but unfortunately I can't.


I think you can do it in two ways-

  1. The data-source - peopleList array contains dictionary which does not have any NSImage object. You can try adding a NSImage object to the dictionary and then display it through bindings.

  2. You can use - tableView:willDisplayCell:forTableColumn:row: in NSTableViewDelegate and for the lastName tablecolumn identifier, set appropriate image to the cell.

Also, since you are a beginner, I would like to refer a simpler example to you : http://dl.dropbox.com/u/9999259/SimpleTable.zip

Hope this helps !

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号