• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Can I set a custom control's type in a XIB to NSOutlineView?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Can I set a custom control's type in a XIB to NSOutlineView?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: NSFileHandle and thread safety
  • Next by Date: Re: Can I set a custom control's type in a XIB to NSOutlineView?
  • Previous by thread: Re: Codesign assumes folder structure, fails.
  • Next by thread: Re: Can I set a custom control's type in a XIB to NSOutlineView?
  • Index(es):
    • Date
    • Thread