changing string in a view based NSTableView

  • I'd like to change the change the string that is displayed in my view based NSTableView to a lowercase string. So I implemented the following in the delegate of the tableview:

    - (NSView *)tableView:(NSTableView *)tableView viewForTableColumn:(NSTableColumn *)tableColumn row:(NSInteger)row
    {
        MyTableCellView *result = [tableView makeViewWithIdentifier:tableColumn.identifier owner:self];
    NSString *key = result.keyTextField.stringValue;

    result.keyTextField.stringValue= [key.stringValue lowercaseString];

        return result;
    }

    keyTextField is an outlet in my custom NSTableCellView. The code gets called, but the string is not affected, because key is an empty string.  All valuables are visible in the table view, so everything else seems to be hooked up correctly (using bindings).

    If I change one line to:

        result.keyTextField.stringValue = @"Test";

    Only a few of the rows will show the word Test, all others will show the value set by the bindings

    What am I missing?

    Thanks,

    - Koen.
previous month july 2012 next month
MTWTFSS
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Go to today