Re: Identical undo between two views (or one view, two windows) puzzle
Re: Identical undo between two views (or one view, two windows) puzzle
- Subject: Re: Identical undo between two views (or one view, two windows) puzzle
- From: Ricky Sharp <email@hidden>
- Date: Wed, 02 Mar 2005 08:02:24 -0600
On Wednesday, March 02, 2005, at 07:06AM, Keith Blount <email@hidden> wrote:
>Hello,
>
>I am currently trying to find the best way of running
>the main view of my app in fullscreen mode. The
>fullscreen part is just about sorted, but I now face
>the problem of implementing undo so that it works
>seemlessly between normal mode and fullscreen mode,
>and I cannot seem to find a method that works.
>
>Fullscreen works by launching a new borderless window
>that has been subclassed to accept key status. My
>first way of putting my view into fullscreen mode was
>by creating a new view in the fullscreen window that
>copied the contents of the normal mode view. On
>exiting fullscreen, I would copy the contents of the
>fullscreen view back into the normal mode view. This
>works very nicely, except that I can find no way of
>getting undo to work between the views. I would need
>to find a way of making NSUndoManager think that both
>views are actually the same view, so that when the
>view is created in fullscreen it copies the undo stack
>from the original view, and when fullscreen is ended,
>the original view copies the undo stack from the
>fullscreen view (does this make any sense?).
>
>I posted about this issue a month or two back, and
>someone very helpfully suggested that instead of going
>this route, I should actually move the original view
>into the fullscreen window when going fullscreen, and
>then move it back again when fullscreen ends. This
>makes sense, but I've a couple of issues. Firstly, the
>fullscreen mode looks very different (colour and scale
>wise), so it means I have to make a lot of changes to
>the appearance of my view before sending it fullscreen
>and then changing them back again on exiting
>fullscreen. Not a big deal, but it means more
>intermediary code. Secondly, it doesn't feel as clean
>- I have had problems getting the view to fit properly
>using this method, though that is no doubt just minor
>errors on my part. More importantly, though, I still
>haven't got undo to work between fullscreen and normal
>mode using this approach, presumably because each
>window has its own undo manager (I have tried
>windowWillReturnUndoManager to no avail).
How is your undo manager registered? Perhaps you can register it with some common object that will not change when switching modes. This object would then just point to the appropriate view.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden