• 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
Re: Strange behaviour of text insertion in NSTextView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behaviour of text insertion in NSTextView


  • Subject: Re: Strange behaviour of text insertion in NSTextView
  • From: Douglas Davidson <email@hidden>
  • Date: Mon, 19 Apr 2004 09:40:51 -0700

On Apr 19, 2004, at 8:26 AM, Jeremy Dronfield wrote:

I have a text view which allows the user to insert text directly from a file. It's done very simply:

fileText = [[NSAttributedString alloc] initWithPath:fromPath documentAttributes:NULL];

[textView insertText:fileText];

The strange behaviour is this: when the source file at fromPath is in MS Word doc format, the insertion dirties the document and can be undone, but when the source is rtf or rtfd, it slips past the text view's undo manager completely unobserved. The document stays clean, and the insertion can't be undone. Has anyone else come across this behaviour, and can anyone explain it?

I don't have an explanation offhand, but I can tell you that insertText: is intended as the funnel point for user typing, and its behavior is not likely to be appropriate for any other use.

Douglas Davidson
_______________________________________________
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.


  • Follow-Ups:
    • Re: Strange behaviour of text insertion in NSTextView
      • From: Jeremy Dronfield <email@hidden>
References: 
 >Strange behaviour of text insertion in NSTextView (From: Jeremy Dronfield <email@hidden>)

  • Prev by Date: Re: CodeWarrior vs. Xcode?
  • Next by Date: Outlined strokes and transparency WAS: Getting PDF and/or EPS data
  • Previous by thread: Strange behaviour of text insertion in NSTextView
  • Next by thread: Re: Strange behaviour of text insertion in NSTextView
  • Index(es):
    • Date
    • Thread