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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to