Re: [NSTableView selectedRow] is always 0?
Re: [NSTableView selectedRow] is always 0?
- Subject: Re: [NSTableView selectedRow] is always 0?
- From: Greg Herlihy <email@hidden>
- Date: Wed, 15 Feb 2006 21:04:47 -0800
- Thread-topic: [NSTableView selectedRow] is always 0?
Did you remember to bind the table's selectionIndexes to the
selectionIndexes of the NSArrayController?
There shouldn't be any need to call reloadData and noteRowsDidChange. One of
the principal benefits of bindings is precisely that such housekeeping tasks
occur automatically.
Greg
On 2/15/06 5:12 PM, "Juan P. Pertierra" <email@hidden> wrote:
> Hello,
>
> I have a table view in which the columns are bound to an
> NSArrayController. I can add and remove items from the array, and
> they get shown on the table just fine. I can select items just fine.
>
> I'm calling reloadData and noteRowsDidChange when every item is
> added. Yet, selectedRow always returns 0. Any ideas? I need to
> know what item is selected to perform an operation on it..
>
> Thanks in advance,
> Juan
> _______________________________________________
> 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
_______________________________________________
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