• 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: Document Saving
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Document Saving


  • Subject: Re: Document Saving
  • From: James Derry <email@hidden>
  • Date: Tue, 05 Nov 2002 21:47:21 -0500

I just ran into this problem myself today. Your TextView probably has Undo
enabled. This causes your document to increment its change count. One
solution is to disable undo in your TextView. The approach I took is to
implement my own change-counter and use [NSDocument updateChangeCount:] (I
think that's the method name!) to set what I felt was the "correct"
dirty-document state.

If I get some time, I'm planning on figuring out how to subclass NSTextView
(or one of its many, many hidden classes) to enable Undo in the TextView
while NOT influencing the document-class change count.

Uh, unless anyone has a better idea or has already done that work???

Jim Derry
--me


On 11/5/02 12:36 PM email@hidden wrote:
> I'm using a Document-Based Cocoa Application template. For some reason when I
> edit my TextView and close the window, it automatically makes the save dialog
> show up. How can I stop this from happening? Thanks.
_______________________________________________
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: Document Saving
      • From: Bryan Blackburn <email@hidden>
  • Prev by Date: Re: drawing with transparency
  • Next by Date: keyed archiving questions
  • Previous by thread: Document Saving
  • Next by thread: Re: Document Saving
  • Index(es):
    • Date
    • Thread