• 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: Apparent NSTableView Bug
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Apparent NSTableView Bug


  • Subject: Re: Apparent NSTableView Bug
  • From: Corbin Dunn <email@hidden>
  • Date: Thu, 28 Jan 2010 14:26:27 -0800

It's definitely a bug in AppKit; thank you for logging it, and including a test case.

Try setting -setAllowsColumnSelection:NO. That work?

corbin

On Jan 28, 2010, at 2:00 PM, Daniel Wambold wrote:

> I have run up against an apparent 10.6.2 bug in the NSTableView object. Specifically, if NSTableViewSelectionHighlightStyleNone is set, the tableView causes Assertion failures and other problems. Below is some code demonstrating the problem. In any event, I need to emulate the None style for highlight in my TableView. Does anyone know how to set the highlight color, perhaps, to clearColor or something with a tiny alpha value so it approximates the None appearance? I can live with undocumented changes, as the program will run on a system with a fixed OS, and I can un-hack the NSTableView when the problem is repaired. (Radar ID# 7588256). If I've done something wrong and this code is the problem, please tell me, as I'm sort of stuck for now.
> Thanks!
> -Dan
>
> Sample code: create a new Cocoa project, drag a tableView into IB, wire it to your controller. When you add a row, click on the header, then on the tableView cell. If you comment out the highlightStyle line, this aberrant behavior disappears.
>
> @implementation MArrayCont
>
> - (void)awakeFromNib
> {
> 	mColTitles = [[NSArray arrayWithObjects:@"One", @"Two", nil] retain];
> 	NSArray *mCols = [myTableView tableColumns];
> 	int i=0;
> 	for (NSTableColumn *aCol in mCols)
> 	{
> 		[aCol bind:@"value" toObject:self
> 	   withKeyPath:[NSString stringWithFormat:@"arrangedObjects.%@", [mColTitles objectAtIndex:i]]
> 		   options:nil];
> 		i++;
> 	}
> 	[myTableView setSelectionHighlightStyle:NSTableViewSelectionHighlightStyleNone];
>
> }
>
> - (IBAction)add:(id)sender
> {
> 	NSMutableDictionary *mNewRow = [[[NSMutableDictionary alloc] init] autorelease];
> 	int i=[[self content] count];		// Just provides some uniqueness to each entry.
> 	for (NSString *aColTitle in mColTitles)
> 	{
> 		[mNewRow setObject:[NSString stringWithFormat:@"%i: %@",i, aColTitle] forKey:aColTitle];
> 	}
> 	[self addObject:mNewRow];
> }
>
> - (void)dealloc
> {
> 	[mColTitles release];
> 	[super dealloc];
> }

_______________________________________________

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: Apparent NSTableView Bug
      • From: Daniel Wambold <email@hidden>
References: 
 >Apparent NSTableView Bug (From: Daniel Wambold <email@hidden>)

  • Prev by Date: Apparent NSTableView Bug
  • Next by Date: Re: Apparent NSTableView Bug
  • Previous by thread: Apparent NSTableView Bug
  • Next by thread: Re: Apparent NSTableView Bug
  • Index(es):
    • Date
    • Thread