jerky scrolling in NSTableView

Posted by Saurabh on Stack Overflow See other posts from Stack Overflow or by Saurabh
Published on 2010-05-17T08:03:47Z Indexed on 2010/05/17 8:10 UTC
Read the original article Hit count: 334

Hello All,

I have a NSTableView with around 70 - 80 rows, each row contain a checkbox, title text and a drop down menu to select data. The problem i am facing is that when i scroll the table it does not scroll smooth. When i remove the NSComboBoxCell it works ok.

Here is the code i used to add NSComboBoxCell -

        NSTableColumn* checkColumn = [tblEditData  tableColumnWithIdentifier:@"Timer"];
        NSCell *aCell = [aTableColumn dataCellForRow:rowIndex];

        [aCell setState:3];

        NSComboBoxCell *comboBoxCell = [NSComboBoxCell new];
        [comboBoxCell addItemWithObjectValue:@"Timer"];
        [comboBoxCell addItemWithObjectValue:@"1"];
        [comboBoxCell addItemWithObjectValue:@"3"];
        [comboBoxCell addItemWithObjectValue:@"6"];
        [comboBoxCell addItemWithObjectValue:@"9"];
        [comboBoxCell addItemWithObjectValue:@"12"];
        [comboBoxCell setStringValue:aDataRow1.timer_val];

        [checkColumn setDataCell:comboBoxCell];

        return comboBoxCell;

Please advice what should i do to remove the jerky scrolling.

Thanks

© Stack Overflow or respective owner

Related posts about cocoa

Related posts about nstableview