-setNeedsDisplay/-display don't work with NSTableView column titles !
-setNeedsDisplay/-display don't work with NSTableView column titles !
- Subject: -setNeedsDisplay/-display don't work with NSTableView column titles !
- From: Raphaël Delcroix <email@hidden>
- Date: Wed, 31 Jul 2002 11:15:52 +0200
Hello,
I have an NSTableView object, and I want to modify the header titles
(using the value of an NSTextField). It works, but not on the screen
(nothing changes). The user needs to click on the title, to see that it
has been modified.
Do I update the right object (myTableView) ?
// this is a notification called when the 'typeTextField' is modified
('type' is the identifier of my column) :
- (void) typeNameChanged:(NSNotification *)n {
NSTableColumn *column = [myTableView
tableColumnWithIdentifier:@"type"];
NSMutableString *title = [[NSMutableString alloc] init];
// I set a string for the future title :
[title setString:[typeTextField stringValue]];
[title appendString:@" for :"];
// I set the title :
[[column headerCell] setStringValue:title];
[title release];
// and this doesn't seem to do anything :
[myTableView setNeedsDisplay:YES];
}
Thanks for all help !
_______________________________________________
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.