On Nov 20, 2013, at 09:52 , Seth Willits <sli...@araelium.com> wrote:

> There’s no setting need to make it cell or view-based. It’s determined simply 
> by what delegate methods are implemented. It must simply be checking for 
> view-based methods before cell-based. Nothing special.

OK, that would explain why I couldn’t find a programmatic way to interrogate 
the type of table. It makes for a fairly awful developer experience, though, 
but it’s just a side issue. So, moving on …

> Did you set up the cell's identifier?

Yes, but I went back and did another do-over. That is, I put back to the 
original XIB, changed the view type to “view-based” in IB, commented out my old 
‘willDisplayCell:’ delegate method, and uncommented my new 
‘viewForTableColumn:’ delegate method.

It turns out that the outline view’s ‘registeredNibsByIdentifier’ shows all of 
the prototypes provided by IB — one per column. I added some debug code to 
instantiate one of these nibs, and it contained a NSTableCellView. That seems 
to make sense.

In my do-over, I tried three things in succession:

1. In IB I left the prototype identifier set to the default “automatic”. The 
corresponding cell view nib was registered under the correct column identifier. 
Seemed pretty automatic to me. What I got from ‘makeViewWithIdentifier: 
column.identifier’ was a plain NSView, not a NSTableCellView.

2. Next, in IB, I set the prototype identifier explicitly to the column’s 
identifier (which what I had originally done, and have always done). Same 
result, both in the list of registered nibs and the created view.

3. Lastly, in IB, I set the prototype identifier explicitly to a non-matching 
string. What I got from ‘makeViewWithIdentifier: column.identifier’ was nil, 
which is what I would have expected.

That all seems to indicate that the prototype is correct and registered under 
the correct name. But it’s still coming out with the wrong view class.

Any other ideas?

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to