Re: Preventing tableView sorting
Re: Preventing tableView sorting
- Subject: Re: Preventing tableView sorting
- From: Kurt Marek <email@hidden>
- Date: Tue, 11 Nov 2003 20:56:07 -0800
Thanks. That worked great.
On Nov 11, 2003, at 7:54 PM, Brian Webster wrote:
Hi Kurt,
I actually just asked the same question. Here's the response I got
from James Dempsey:
On Nov 11, 2003, at 8:51 PM, James Dempsey wrote:
Brian,
The first part is a how to that should get you going - followed by a
bit of explanation.
You need to do the following:
The How:
Select the table view itself and inspect its bindings.
You will see three Table Content bindings for the table view:
content
selectionIndexes
sortDescriptors
Bind the content to:
Bind To: Your Array Controller
Controller Key: arrangedObjects
Model Key Path: <leave this blank>
Bind the selectionIndexes to:
Bind To: Your Array Controller
Controller Key: selectionIndexes
Model Key Path: <leave this blank>
Leave sortDescriptors unbound
A little of what's going on:
Typically you only need to bind each table column value binding to
the arranged objects of an array controller. When you do this,
behind the scenes, all three table view content bindings are
automatically 'hooked up' for you.
It is only when you need to change these three default content
bindings that you need to visit the table view's bindings.
You can also use this mechanism to do other things with a table
view's bindings (like pull the selection indexes from one array
controller, while displaying the arranged objects of another array
controller). I don't have a particularly good use for that in mind
at the moment.
Hope this helps.
-James
---------------------------
James Dempsey
Operations Engineer
Apple Software Customer Seeding
Apple Software Engineering
On Nov 11, 2003, at 9:22 PM, Kurt Marek wrote:
How do I prevent a tableView from being sorted? I don't want the user
to be able to click on the column and sort the table at all.
Thanks,
Kurt
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.