Re: Undo/Redo Notifications
Re: Undo/Redo Notifications
- Subject: Re: Undo/Redo Notifications
- From: Fritz Anderson <email@hidden>
- Date: Sat, 22 May 2010 20:02:25 -0500
On 22 May 2010, at 4:30 PM, Gordon Apple wrote:
> So far, I don't see what I need for enabling/disabling undo/redo buttons in
> iPhoneOS NSUndoManager. I want to implement an undo button/popover, a la
> Pages, for a UITextView. I know I can read canUndo/canRedo, but I need an
> active notification when undo status changes in order to enable/disable the
> button and popover action buttons. What is the best way to get this,
> preferably without subclassing UITextView? Available notifications don't
> seem to be what I need.
>
> (MacOS usually does this when dropping a menu. That doesn't work here.)
Tell us how the NSUndoManager...Notifications don't work for you. They apply only to actual undo/redo events, and the opening and closing of undo groups, but I'd have enough hope that the UIKit text system aggregated change events that I'd test to see if those notifications came through. Have you done that?
Analogies to Mac OS menu validations don't work. It's pretty plain that Apple _really_ doesn't want to see menus in iPhone OS applications.
Pages can do it (technically) because it doesn't rely on the text controls to modify text. Everything goes through the Pages event loop, so it knows independently whether something has been modified.
Pages can do it as UI, on Apple's long-standing user-experience principle of Quod Licet Jovi Non Licet Bovi.
If you really needed it, you could hold your nose and poll every half-second or so.
— F
_______________________________________________
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