• 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
Letting an instance know its own index within a container
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Letting an instance know its own index within a container


  • Subject: Letting an instance know its own index within a container
  • From: Gordon Apple <email@hidden>
  • Date: Tue, 07 Jan 2014 11:02:51 -0500
  • Thread-topic: Letting an instance know its own index within a container

If all you are trying to do is display row numbers, the only reasonable way
I know is to use the table¹s delegates, then find and insert the row number
for your table¹s number column.  Doing it the way you stated would preclude
display elsewhere if you needed that later. IMHO, it¹s preferable to use the
table structure rather than trying to handle it in your data model. Of
course, if you are creating separate elements for the table, based on your
data model, you might be able to do something like that.


On 1/7/14 11:32 AM, "email@hidden"
<email@hidden> wrote:

> Rethinking the problem of how to display row numbers in a view based
> NSTableView from a different perspective: I could use bindings if I could
> manage to make my row entities know their index within the table view content
> array. As a solution I could device a delegate for my entities and make the
> entity order the delegate to send a query to the array controller about its
> own index in arranged objects. Does this seem like a sane approach?


_______________________________________________

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


  • Prev by Date: Re: Set up an editable view based NSTableView programmatically - how to?
  • Next by Date: Re: Letting an instance know its own index within a container array - how to?
  • Previous by thread: UINavigationBar.tintColor life on own?
  • Next by thread: BT data (NSData *) question
  • Index(es):
    • Date
    • Thread