i have a NSTableview that uses cocoa bindings. i need to disable sorting in the table and to do so i found following text here on stackoverflow:
If you use Cocoa bindings to manage the data, the sort descriptor is generated by the table column and set to the NSArrayController. To stop it, just open the inspector of the binding of the table column, select value, and uncheck "Creates Sort Descriptor."
If you are setting up your bindings on the arraycontroller programmatically, you should be able to pass in extra binding options like so.
NSMutableDictionary *bindingOptions = [NSMutableDictionary dictionary]; [bindingOptions setObject:[NSNumber numberWithBool:NO] forKey:NSCreatesSortDescriptorBindingOption]; [column bind:@"value" toObject:self.arrayController withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@",c.key] options:bindingOptions];