Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notification when an action is to be dropped #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pcuenca
Copy link

@pcuenca pcuenca commented Aug 25, 2012

Hi Sean,

Thanks for your latest changes. The only difference in my fork now is just revision 50e7189, which posts a notification when actions are about to be dropped because the undo limit has been reached. I'm using it to release some internal data structures in my application when I'm sure they are not going to be needed any more because the possibility of undoing expired. It's helping my housekeeping a good deal, but I don't know if it would be interesting for a generality of users, though.

Thanks!

pcuenca added 2 commits June 3, 2012 15:39
…he 'levelsOfUndo' limit was reached. The userInfo dictionary associated to the notification contains the to-be-dropped action for the GCUndoManagerActionKey key.

Two notifications are, in fact, posted: GCUndoManagerWillDropUndoActionNotification when dropping undo actions, or GCUndoManagerWillDropRedoActionNotification when dropping redo actions. The latter is only posted when setting 'levelsOfUndo' to a number greater than the current count of the redo stack.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants