Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think you're misunderstanding the method described in that answer.</p> <p>You're getting a compiler error because you are trying to implement the same method twice. The following would all be implementations of the same method:</p> <pre><code>- (void)setBlah:(id)aBlah { - (void)setBlah:(id)newBlah { - (void)setBlah:(id)theNewBlah { </code></pre> <p>The different "names" given to the parameter that follows the <code>(id)</code> parameter type are only local to the implementation block of that method.</p> <p>You should be able to accomplish what you want to do using code like the following:</p> <pre><code>@synthesize tableView1; @synthesize tableView2; - (NSUInteger)numberOfRowsInTableView:(NSTableView *)aTableView { if (aTableView == tableView1) return 1; else if (aTableView == tableView2) return 2; return 0; } - (NSView *)tableView:(NSTableView *)aTableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row { NSTableCellView *tableCellView = [aTableView makeViewWithIdentifier:tableColumn.identifier owner:self]; if (aTableView == tableView1) { tableCellView.textField.stringValue = @"This should appear in the first tableView"; } else if (aTableView == tableView2) { tableCellView.textField.stringValue = @"This should appear in the second tableView"; } return tableCellView; } </code></pre> <p>Notice that I made sure to name the parameter <code>aTableView</code>, something different from the instance variables, so that I can successfully compare it to the instance variables in the following lines.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload