Re: Implement a browser like 'back' feature
Re: Implement a browser like 'back' feature
- Subject: Re: Implement a browser like 'back' feature
- From: David Reed <email@hidden>
- Date: Fri, 24 Jun 2005 17:03:42 -0400
Mike,
I needed a similar feature for a project which implemented a
web-browser-type UI. I ended up just giving my browsers an
NSUndoManager ivar (not NSDocument's default undo manager) and using
that. For my purposes, it works pretty well - I just register undos
when the currently displayed page (or cue, whatever is being navigated
through) changes, and call -undo and -redo to go backwards and
forwards.
If your project is implemented in such a way that one method call
changes your display state (i.e., in my case I have a setPage: accessor
that sets the view and updates everything), using NSUndoManager might
be the way to go.
Hope this helps,
David.
--
David Reed | email@hidden | AIM/iChat: parmadil01
On Jun 24, 2005, at 16:16, Michael Swan wrote:
I have a program that uses an NSTableView that displays a list of
cues. The user can select a particular cue and then press 'GO' to make
that cue active. I want to make it so that the user can also step back
through the cues in the order they were activated (much like the back
button in a web browser). I think it will make use of the undo
feature but not sure how. Any guidance would be helpful, I've looked
for open source browser projects and the such to get an idea with no
luck.
Thanks,
Mike
"As human beings our greatness lies not so much in being able to
remake the world... as being able to remake ourselves" - Gandhi
_______________________________________________
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
_______________________________________________
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