Re: Line Numbers in Tables
Re: Line Numbers in Tables
- Subject: Re: Line Numbers in Tables
- From: mmalc crawford <email@hidden>
- Date: Wed, 29 Aug 2007 14:08:04 -0700
On Aug 29, 2007, at 1:57 PM, Antonio Nunes wrote:
I bind the value binding of the line number column of the tableview
to the relevant arraycontroller using a path to a method implemented
in the object controlled by the controller". (Wow, wasn't that a
mouthful! In short, something like: value = arrangedIndex.listIndex
[YourController].)
The method in your controller object can be something to the extent
of:
- (unsigned)listIndex
{
return [myArrayObject indexOfObject:self] + 1;
}
Don't do this.
It violates MVC -- it ties the implementation of the model object to a
particular interface configuration.
(What happens when a given object is displayed in more than one table
view?)
mmalc
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden