On May 1, 2013, at 12:52 , "Gerriet M. Denkmann" <[email protected]> wrote:
> Can't find the method: 'tableView:viewWithIdentifier…'. But > makeViewWithIdentifier:... is never called. It was used in > ...viewForTableColumn:... which was never called and has just been removed. > I guess this is the root of the problem: I do not know where to call > makeViewWithIdentifier. > But do I need to? both things in the NSTableCellView have bindings already. The header comments for 'tableView:viewForTableColumn:' say: > Bindings: This method is optional if at least one identifier has been > associated with the TableView at design time. If this method is not > implemented, the table will automatically call -[self > makeViewWithIdentifier:[tableColumn identifier] owner:[tableView delegate]] > to attempt to reuse a previous view, or automatically unarchive an associated > prototype view. So you don't need the method (because you have bindings), but you need to make sure that the table column identifier matches the interface identifier of the "prototype" view. > id g = [ self.arrayController arrangedObjects ]; // > _NSControllerArrayProxy > NSLog(@"%s arrangedObjects %ld ",__FUNCTION__, [g count]); > prints 39 as expected. So the array controller is not empty. It also contains > correct objects. > > Just bound the image to "objectValue.AbsoluteNonsense" and did not get any > error messages. Is this normal? If it's not creating any cell views, there won't be any errors. I think you still need to find out whether it's the table view binding or the cell view binding that's failing. You could insert a line of code, after the table view is supposedly initialized, to query the number of rows and see if it's 39. Note that the fact that the array controller contains the right objects doesn't necessarily mean anything, if KVO compliance is messed up. It's a matter of timing, in that case, as to what results you get. You could try throwing in a 'reloadData' for the table, once you're sure the array controller has the right content, and see if that changes things. If so, you have a KVO compliance problem earlier in the initialization. _______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
