• 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
struggling with binding, NSOutlineView, and NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

struggling with binding, NSOutlineView, and NSTableView


  • Subject: struggling with binding, NSOutlineView, and NSTableView
  • From: David Owens <email@hidden>
  • Date: Wed, 13 May 2009 13:49:28 -0700

I've been struggling to get this working properly for a few days now; I can't seem to figure out what the problem is.

The basic setup of my app is this:

- I have an NSTableView that contains items bound from an NSArrayController
- I have an NSOutlineView that I'd like to display items based on the selected item in the NSTableView
- I have some NSLabels on the window that bind to data for the selected item in the NSArrayController


The NSLabels display the data correctly based on their bindings to the NSArrayController.
The NSTableView correctly shows the items within the NSArrayController.
The NSOutlineView attempts to display the information, but for the life of me I cannot call into the selected item to retrieve the data for the columns.


I've tried many different things, but none seem to get me the correct data.

My structure is like this:

Window
 - delegate -> File's Owner

Object (my Window controller)
- outlet connects the NSTableView, NSOutlineView, and the NSArrayController
- implements
- (void)tableViewSelectionDidChange:(NSNotification *)aNotification
This is done to try and explicitly set the item for the datasource of the NSOutlineView; also calls setNeedsDisplay on NSOutlineView


Object (datasource/delegate for the NSOutlineView)
- Has a property that is set by the selection change that is supposed to be the selected item in the NSTableView



Am I going about this the wrong way? Any ideas on what I might be screwing up on?


In addition, I've also tried having an outlet on the NSOutlineView datasource class that points to the NSArrayController and then trying to call my class methods from the NSArrayController' selection key, but that resulted in the same problem of my app just crashing.

Thanks,
David
_______________________________________________

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: struggling with binding, NSOutlineView, and NSTableView
      • From: Kyle Sluder <email@hidden>
  • Prev by Date: Re: Getting "Unknown class 'someClassName' in nib file" message
  • Next by Date: Re: beginner's question: having problems with saving/loading
  • Previous by thread: Re: Menu item and state
  • Next by thread: Re: struggling with binding, NSOutlineView, and NSTableView
  • Index(es):
    • Date
    • Thread