Re: index column in bound NSTableView
Re: index column in bound NSTableView
- Subject: Re: index column in bound NSTableView
- From: Matt Neuburg <email@hidden>
- Date: Mon, 24 Jan 2005 13:43:30 -0800
On Mon, 24 Jan 2005 08:30:42 -0800, Alex Rosenberg <email@hidden> said:
>On Jan 23, 2005, at 10:50 AM, Matt Neuburg wrote:
>
>> On Fri, 21 Jan 2005 14:37:09 -0800, Alex Rosenberg <email@hidden>
>> said:
>>> Given an NSTableView using bindings, is there a simple way to add a
>>> column of the original array index numbers?
>>>
>>> The numbers should properly jumble when the the table is sorted.
>>
>> The array is presumably an array of something - like, mutable
>> dictionaries.
>> So I would write a routine that runs through the array, and adds to
>> each
>> mutable dictionary a key-value pair whose key corresponds to the extra
>> column in the table and whose value is the index number. m.
>
>Unfortunately, it's never that simple. One would need to track all
>rearrangements and walk through the entire thing and shift or reindex
>it as objects are inserted/deleted/rearranged.
You said "a column of the *original* array index numbers". I don't get how
that squares with "track all rearrangements". It's possible I didn't
understand the question. It wouldn't be the first time. Feel free to restate
it. Also, feel free to look at the source code of my Thucydides app (the
source code that uses bindings) for an example of how to present in the
interface a different bound array than the one that is lurking in the
background ready to be restored at any time; this might be relevant, though
I can't tell because, as I say, I no longer have any sense of what you're
asking. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden