Re: Adding an undo method in textView:shouldChangeTextInRange:...
Re: Adding an undo method in textView:shouldChangeTextInRange:...
- Subject: Re: Adding an undo method in textView:shouldChangeTextInRange:...
- From: "Martin" <email@hidden>
- Date: Fri, 14 Jan 2005 18:11:08 -0800
Keith,
>Your attributes suggestion would be nice and simple,
>but the trouble is, how would each card know which
>piece of text with that attribute that it was attached
>to?
Remember that an attribute has both a name and a value. The value can be anything you like, eg: a unique ID that you can map to a card.
>if the character is deleted, I don't want the margin
>card deleted - instead, it should now be attached to
>the character at the end of the attachment range.
This might be awkward to implement with attachment characters, since you'll run into the same problem as before. Namely that if you register an undo invocation while the user is typing it will break NSTextView's coalescing of keystrokes.
This may or may not be a problem depending on when/where you relocate your card attachments. Perhaps the break in the undo group will appear to be quite natural to your users, since they will correspond to when the card attachment were deleted.
>P.S. Your e-mail suggests you are from Nisus - if so,
>I have to say, I love NWE 2!
I am indeed from Nisus Software. I'm happy to hear that you enjoy our product! Working on it has definitely given me some experience with Apple's text system ;)
~Martin
_______________________________________________
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