NSTableView text editing notifications/delegation vs. attributed string cells?
NSTableView text editing notifications/delegation vs. attributed string cells?
- Subject: NSTableView text editing notifications/delegation vs. attributed string cells?
- From: Jim Correia <email@hidden>
- Date: Tue, 28 Feb 2006 12:25:27 -0500
The notifications/delegate methods for control text editing look like
this:
@interface NSObject(NSTextDelegate)
- (BOOL)textShouldBeginEditing:(NSText *)textObject; /* YES means do
it */
- (BOOL)textShouldEndEditing:(NSText *)textObject; /* YES means do it */
- (void)textDidBeginEditing:(NSNotification *)notification;
- (void)textDidEndEditing:(NSNotification *)notification;
- (void)textDidChange:(NSNotification *)notification; /* Any keyDown
or paste which changes the contents causes this */
@end
Suppose I have a cell for which -allowsEditingTextAttributes is true.
What is the preferred way to get back the attributedString in
textShouldEndEditing?
NSText doesn't appear to have attributed string accessor methods. I
could certainly do the if ([textObject respondsToSelect:...]) dance
here, but I'm wondering if I might have missed something obvious?
Jim
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden