{"id":225,"date":"2007-06-21T08:30:07","date_gmt":"2007-06-22T00:30:07","guid":{"rendered":"http:\/\/www.corbinstreehouse.com\/blog\/?p=225"},"modified":"2018-10-31T10:16:18","modified_gmt":"2018-10-31T17:16:18","slug":"nsbrowser-bindings-and-a-custom-cell-class","status":"publish","type":"post","link":"https:\/\/www.corbinstreehouse.com\/blog\/2007\/06\/nsbrowser-bindings-and-a-custom-cell-class\/","title":{"rendered":"NSBrowser, bindings, and a custom cell class"},"content":{"rendered":"<p id=\"top\" \/>\n<p>Hi Cocoa Programmers,<\/p>\n<p>There is a small bug in <span class=\"caps\">NSB<\/span>rowser if you use bindings and want a custom cell class. Typically, you would do something like this in your awakeFromNib:<\/p>\n<pre class=\"code\">\n- (void)awakeFromNib {\n    [iBrowser setCellClass:[ImageTextBrowserCell class]];\n}\n<\/pre>\n<p>However, if you are using bindings, it won&#8217;t work. The cells that were archived out in the nib file will not have the proper class. So, you have to nudge <span class=\"caps\">NSB<\/span>rowser a bit to get it going:<\/p>\n<pre class=\"code\">\n- (void)awakeFromNib {\n    [iBrowser setCellClass:[ImageTextBrowserCell class]];\n    [iBrowser loadColumnZero];\n}\n<\/pre>\n<p>Just a quick tip in case you run into this!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi Cocoa Programmers, There is a small bug in NSBrowser if you use bindings and want a custom cell class. Typically, you would do something like this in your awakeFromNib: &#8211; (void)awakeFromNib { [iBrowser setCellClass:[ImageTextBrowserCell&#8230; <a class=\"read-more\" href=\"https:\/\/www.corbinstreehouse.com\/blog\/2007\/06\/nsbrowser-bindings-and-a-custom-cell-class\/\">[read more]<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[4,6,1],"tags":[63,130,72],"class_list":["post-225","post","type-post","status-publish","format-standard","hentry","category-apple","category-cocoa","category-general","tag-cocoa","tag-objc","tag-programming"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts\/225","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/comments?post=225"}],"version-history":[{"count":1,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts\/225\/revisions"}],"predecessor-version":[{"id":5332,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/posts\/225\/revisions\/5332"}],"wp:attachment":[{"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/media?parent=225"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/categories?post=225"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.corbinstreehouse.com\/blog\/wp-json\/wp\/v2\/tags?post=225"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}