Re: View Based TableView - how to use bindings?
Re: View Based TableView - how to use bindings?
- Subject: Re: View Based TableView - how to use bindings?
- From: Quincey Morris <email@hidden>
- Date: Wed, 01 May 2013 12:16:05 -0700
On May 1, 2013, at 11:52 , "Gerriet M. Denkmann" <email@hidden> wrote:
> The Array Controller has it's content bound to some array of dictionaries, which have the keys "Name" and "Image".
> The table view's content is bound to Array Controller arrangedObjects. The only TableColumn is not bound to anything.
> The Image View of the Table Cell View has it's Value bound to Table Cell View objectValue.Image.
> The Static Text of the Table Cell View has it's Value bound to Table Cell View objectValue.Name.
>
> But still - the table remains empty.
What kind of empty? Are there any rows? Can you select rows by clicking on them, even if their content is blank?
Are you sure there aren't any exception or other messages in the Console log that you didn't see?
You could try temporarily unbinding the image and text properties of the cell view, so that they should display whatever they're showing in IB. That might give a clearer idea of whether it's the binding from the table to the array controller that's at fault, or the bindings from the cell subviews to the cell view.
Do you still have a 'tableView:objectValue…' method, or do you set objectValue in 'tableView:viewWithIdentifier…'? Neither should be necessary when using the table view binding to the array controller.
Is your cell view a subclass of NSTableCellView, or something else? Are you trying to use the built-in (design-time) table cell view, or have you registered a nib to provide the cell views?
Are you sure you're using the correct view identifier in 'tableView:viewWithIdentifier…'? Are you sure 'makeViewWithIdentifer:' isn't returning nil?
Are you sure this is a table view issue, and not a KVO compliance issue with the property that's supplying the array controller content?
There's lots that can go wrong here. :)
_______________________________________________
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