• 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: NSTableView Column Header Restrictions?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTableView Column Header Restrictions?


  • Subject: Re: NSTableView Column Header Restrictions?
  • From: Daniel Wambold <email@hidden>
  • Date: Sun, 31 Jan 2010 16:16:39 -0500

Previous problem solved:
A few weeks ago, I posted a question pertaining to trouble I was having when tableView column header cell titles contained period (.) characters. After working around it, I recently discovered the source of my problem and I figured I'd post just in case anyone else stumbled down this same path.
In brief, I have an NSTableView to which the user can add user-titled columns. I bound the tableView's columns to a controller programmatically. This was the root of my trouble. I chose to use the column title strings as the keys for the binding, like this:

<code>
[aTableColumn bind:@"value" toObject:myDataController withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@", [myTitleArray objectAtIndex:i]] options:nil];
</code>

Of course, when the %@ in the formatted string was replaced with a column title containing a period, the key acquired an incorrect dot-syntax appendage. For whatever reason, that error then caused several messages regarding object validation to occur, convincing me that I had accidentally requested object validation.
In any event, the error was entirely mine, and periods can easily coexist with column titles as long as I do something like [[myTitleArray objectAtIndex:i] stringByReplacingOccurrencesOfString:@"." withString:@""].
-dan_______________________________________________

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: NSTableView Column Header Restrictions?
      • From: Quincey Morris <email@hidden>
  • Prev by Date: Re: Tabbing between cells in a complex control
  • Next by Date: Re: determining HTML text encoding
  • Previous by thread: Re: NSTableView Column Header Restrictions?
  • Next by thread: Re: NSTableView Column Header Restrictions?
  • Index(es):
    • Date
    • Thread