• 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
Nontrivial Undo Support for WebView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Nontrivial Undo Support for WebView


  • Subject: Nontrivial Undo Support for WebView
  • From: "Benjamin Jackson" <email@hidden>
  • Date: Tue, 15 May 2007 20:02:07 -0300

Hi all,

I'm working on an application which uses a WebView that interacts with
some external controls. The controls modify my Model class, which
generates some HTML and outputs it into the WebView by loading a
temporary file.

This was all well and good until I tried to add undo support to my
application. I tried subclassing WebView and setting undoManager: to
return the same UndoManager as my Model, which worked until a page
reload was required, at which point the UndoManager seemed to push
only the WebView's undo commands off the stack. This sort of makes
sense, since I imagine that the intent of the designers was that if
I'm reloading a page I'm probably opening up a new document and won't
need those actions anymore.

I've found one example of seamless undo with an NSTextField and other
controls in the Vermont Cocoa Recipe's sample code
(http://www.stepwise.com/Articles/VermontRecipes/), but none of those
actions modify the contents of the text view, and I doubt it will work
for my case.

Does anyone have an idea what I can do to work around this? I imagine
there's some methods hiding in the WebView docs that I can override to
get an elegant solution for this.

Thanks,
Ben
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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


  • Prev by Date: Re: Status Item problems
  • Next by Date: text in tableview animating inappropriately
  • Previous by thread: sheet animation attributes
  • Next by thread: text in tableview animating inappropriately
  • Index(es):
    • Date
    • Thread