Disabling NSTableView Sorting While Using Bindings


Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 170

Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer.php on line 218

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 53

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 54

Deprecated: Non-static method CodeColorerOptions::ParseOptions() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 84

Deprecated: Non-static method CodeColorerOptions::PopulateDefaultValues() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 70

Deprecated: Non-static method CodeColorerOptions::FilterLanguage() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 106

Deprecated: Non-static method CodeColorerOptions::GetLanguageMappings() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 250

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 161

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 177

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 73

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 76

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 79

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 82

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 85

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 88

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 91

Deprecated: Non-static method CodeColorerOptions::ParseOptions() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 84

Deprecated: Non-static method CodeColorerOptions::PopulateDefaultValues() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 70

Deprecated: Non-static method CodeColorerOptions::FilterLanguage() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 106

Deprecated: Non-static method CodeColorerOptions::GetLanguageMappings() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 250

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 161

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 177

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 73

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 76

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 79

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 82

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 85

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 88

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 91

Deprecated: Non-static method CodeColorerOptions::ParseOptions() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 84

Deprecated: Non-static method CodeColorerOptions::PopulateDefaultValues() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 70

Deprecated: Non-static method CodeColorerOptions::FilterLanguage() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 106

Deprecated: Non-static method CodeColorerOptions::GetLanguageMappings() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 250

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 161

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 177

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 73

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 76

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 79

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 82

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 85

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 88

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 91

Deprecated: Non-static method CodeColorerOptions::ParseOptions() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 84

Deprecated: Non-static method CodeColorerOptions::PopulateDefaultValues() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 70

Deprecated: Non-static method CodeColorerOptions::FilterLanguage() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 106

Deprecated: Non-static method CodeColorerOptions::GetLanguageMappings() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 250

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 161

Deprecated: Non-static method CodeColorerOptions::ParseBoolean() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 177

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 73

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 76

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 79

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 82

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 85

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 88

Deprecated: Non-static method CodeColorerOptions::ParseMode() should not be called statically, assuming $this from incompatible context in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-options.php on line 91

Warning: shuffle() expects parameter 1 to be array, null given in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/wordpress-support/wordpress-support.php(10) : runtime-created function(1) : eval()'d code(1) : eval()'d code on line 1

Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 170

Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer.php on line 226

Cocoa is very nice in that it gives you alot of functionality “for free”; spell checking, table sorting, text searching, font selection, etc, etc. Unfortunately it can be hard to disable the “for free” functionality; for instance, table sorting. To disable table sorting in a NSTableView using Cocoa bindings (via NSArrayController) isn’t as simple as clicking a “isSortable” checkbox in interface builder, or calling

-[table setIsSortable:NO];

; the solution is less straightforward than you would expect. Apple hasn’t documented how to disable sorting in table views using bindings, so it was up to a clever programmer to figure it out. Unfortunately, his solution didn’t work for me, my custom NSCell’s

setObectValue:

method kept being sent

nil

for some odd reason. After a little more searching I found a solution that worked for me. Sisabling sorting when using bindings is as simple as calling

[tableView unbind:@"sortDescriptors"];

; Apple, please document this type of stuff instead of leaving us to waste time figuring it out!

2 Responses to “Disabling NSTableView Sorting While Using Bindings”



  • Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer.php on line 218

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 53

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 54

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer.php on line 226

    Thank you!

    I was going a bit insane trying to work out how to do this, and the solution you initially linked to is working for me, as I’m using a standard cell type.

    cheers!


  • Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallBeforeHighlightCodeBlock() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer.php on line 218

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 53

    Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer-core.php on line 54

    Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method CodeColorerLoader::CallAfterHighlightCodeBlock() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 170

    Strict Standards: Non-static method CodeColorer::GetInstance() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-content/plugins/codecolorer/codecolorer.php on line 226

    Eighteen months later and this is still pretty hard to figure out. Thanks a lot, you saved some of my hair.

Leave a Reply





Strict Standards: call_user_func_array() expects parameter 1 to be a valid callback, non-static method K2::init_scripts() should not be called statically in /home/iloveitaly/mabblog.com/blog/wp-includes/plugin.php on line 405