• 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
Issues with NSTextView and undoing attributes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issues with NSTextView and undoing attributes


  • Subject: Issues with NSTextView and undoing attributes
  • From: Scott Lehman <email@hidden>
  • Date: Sun, 5 Mar 2006 15:34:18 -0800 (PST)

Hi all,

I have an NSTextView subclass and in one operation, I
programmatically apply a new paragraph style to a
paragraph to change spacing, using
shouldChangeTextInRange: replacementString: to
register for undo.

When I undo the action, the style applied in the
operation is undone, but the paragraph style that was
present before the operation does not get restored.
The previous style was set by the NSTextView itself
during typing, rather than programmaticaly.

Is there something else that needs to be done to
ensure the original attributes get restored?  The best
solution I can think of right now is to take over the
undo registration of the operation, though I suspect
NSTextView can take care of it for me - assuming I did
everything else right :)

Thanks,

Scott

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
 _______________________________________________
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

  • Prev by Date: Re: NSOpenPanel icon view
  • Next by Date: Fastest Datastore?
  • Previous by thread: Re: How to send myself an AppleEvent?
  • Next by thread: Fastest Datastore?
  • Index(es):
    • Date
    • Thread