• 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
-setNeedsDisplay/-display don't work with NSTableView column titles !
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

-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.

  • Prev by Date: Re: Accessor methods and (auto)release <Memory trail>
  • Next by Date: Re: NSImageRep.imageFileTypes() doesnt work...
  • Previous by thread: Re: apple help
  • Next by thread: PDF generation bug? w/ attachment
  • Index(es):
    • Date
    • Thread