Can I set a custom control's type in a XIB to NSOutlineView?
Can I set a custom control's type in a XIB to NSOutlineView?
- Subject: Can I set a custom control's type in a XIB to NSOutlineView?
- From: David Burnard <email@hidden>
- Date: Thu, 28 Jul 2016 10:05:04 -0700
I’ve got a scroll view scrolling a stack view. I want the first view in the stack to be an NSOutlineView and the second to be some other view.
I don’t want another scroll view around the NSOutlineView, so I can’t use the ScrollView assembly that IB provides.
So I’m using a custom view, and set it’s type to NSOutlineView.
In my xib file I have an NSTableColumn and an NSTableCellView that I are into IBOutlets on my controller.
I tried adding the column via [outlineView addTableColumn:] but afterwards, in the debugger, the _tableColumns array is still nil.
I must be missing something, or NSOutlineView is not supported as a custom class type.
When
- (NSInteger)outlineView:(NSOutlineView*)outlineView numberOfChildrenOfItem:(id)item
is called, I return an appropriate count, but
Later I don’t see any calls to me override of
- (NSView *)outlineView:(NSOutlineView *)outlineView viewForTableColumn:(NSTableColumn *)tableColumn item:(id)item
I’m thinking that is because my OutlineView doesn’t think it has any columns.
Has anyone had any experience with this type of arrangement, using NSTableView/NSOutlineView as a custom control in a xib file?
Dave Burnard
_______________________________________________
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