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

Re: Ephemeral Changes


  • Subject: Re: Ephemeral Changes
  • From: Graham Cox <email@hidden>
  • Date: Wed, 26 Mar 2008 09:12:32 +1100

There may be a simpler way, but this is what occurred to me when I read this:

Subclass NSTextView and override -changeFont: -changeAttributes: and any other "ephemeral" method. Turn off the undo manager using - disableUndoRegistration, call super, then turn it back on again.

Be warned I haven't tried it, so may be way off.

------
S.O.S.



On 26 Mar 2008, at 4:48 am, Gerriet M. Denkmann wrote:

I have a document based Cocoa editor, which handles simple text files (setRichText: NO).
It handles undo and font changes.


But the files are just plain text files; no font information gets stored.

So I would like that the document does NOT get dirty (isDocumentEdited) if only the font has been changed.

This would imply that we have two kinds of changes: "real" changes (like typing, cut and paste of text, etc.) and "ephemeral" changes (e.g. change of font).
Both are recorded by the NSUndoManager, but only "real" changes make the document dirty.


How could this be done in 10.4.11 ?

Kind regards,

Gerriet.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Ephemeral Changes
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Ephemeral Changes (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: Garbage collection - was Beginner with Cocoa
  • Next by Date: Re: Garbage collection - was Beginner with Cocoa
  • Previous by thread: Ephemeral Changes
  • Next by thread: Re: Ephemeral Changes
  • Index(es):
    • Date
    • Thread