• 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
NSTableView text editing notifications/delegation vs. attributed string cells?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: NSTableView text editing notifications/delegation vs. attributed string cells?
      • From: Douglas Davidson <email@hidden>
    • Re: NSTableView text editing notifications/delegation vs. attributed string cells?
      • From: Nick Zitzmann <email@hidden>
  • Prev by Date: Re: kqueue OK in 10.4, not calling back to CFSocket in 10.3
  • Next by Date: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • Previous by thread: Drag Font && NSFontPboardType
  • Next by thread: Re: NSTableView text editing notifications/delegation vs. attributed string cells?
  • Index(es):
    • Date
    • Thread