[haiku-development] Re: session manager

  • From: Ryan Leavengood <leavengood@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 26 Jun 2011 21:42:03 -0400

On Sun, Jun 26, 2011 at 7:48 PM, Clemens <clemens.zeidler@xxxxxxxxxxxxxx> wrote:
> Storing and restoring a undo history sounds not trivial but is definitely 
> desirable.

Well this sounds like another API we could use: a generic undo API. I
know I could find something like that useful in the WebKit port
eventually, since implementing undo for form controls is offloaded to
the platform.

If the undo API included command classes which could be archived
(which would probably be pretty easy to implement) it would be trivial
to save and restore the state.

> virtual status_t                        SaveState(BMessage* state);
> This path would point to a directory where additional files for this
> application can be stored. Its a bit hacky but it would fits more the
> archive semantics.

Why can't the application just store everything in the given message?
Why would it need another directory?

I personally don't like the idea of passing information to a method in
a BMessage which is also used to store state.


Other related posts: