Text color of dragged rows in NSTableView
Text color of dragged rows in NSTableView
- Subject: Text color of dragged rows in NSTableView
- From: Saratchandra Kongara <email@hidden>
- Date: Fri, 22 Nov 2002 11:02:29 -0500
Hello,
I am working on adding Drag N Drop support in my application. I have an
outline view and a table view. I like to drag rows in my table view and
drop them on to my outline view items. I have a little problem with my
implementation, the text color of the dragged rows (in the clipping) is
white sometimes and is barely visible. This behavior is random. The
text color keeps changing between black and white randomly. Here is the
code.
- (BOOL)tableView:(NSTableView *)tv writeRows:(NSArray *)rows
toPasteboard:(NSPasteboard *)pboard {
NSMutableArray *rowArray = [[NSMutableArray alloc] init];
NSEnumerator *enumerator = [rows objectEnumerator];
id object;
while(object = [enumerator nextObject]) {
int rowNumber = [object intValue];
[rowArray addObject:[[self tableDataSource]
objectAtIndex:rowNumber]];
}
NSData *data = [NSArchiver archivedDataWithRootObject:rowArray];
[pboard declareTypes: [NSArray arrayWithObjects:@"table_item", nil]
owner:self];
[pboard set
Data:data forType:@"table_item"];
[rowArray release];
return YES;
}
Any suggestions? Thanks.
Regards
Sarat
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.