• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Line Numbers in Tables
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Line Numbers in Tables
      • From: Antonio Nunes <email@hidden>
References: 
 >Line Numbers in Tables (From: Gordon Apple <email@hidden>)
 >Re: Line Numbers in Tables (From: Antonio Nunes <email@hidden>)

  • Prev by Date: Re: Line Numbers in Tables
  • Next by Date: Re: NSPersistentDocument and Multiple Managed Object Models?
  • Previous by thread: Re: Line Numbers in Tables
  • Next by thread: Re: Line Numbers in Tables
  • Index(es):
    • Date
    • Thread