Page 1 of 1

Does Undo Undo or not!

Posted: Wed Mar 17, 2010 1:06 am
by phaworth
So what exactly does Undo in the IDE do? I just inadvertently deleted a group from a card containing a bunch of objects. Hit Undo, nothing happened. If Undo ain't gonna work, then either there should be a warning when deleting objects, and the Undo menu option should be greyed out when it's not available.

Fortunately, I have Time Machine Backups of my .rev file so I won;t have lost more than an hour's work. I'll restore the most recent backup of the .rev file and keep the original. How do I copy the card and all it's scripts from the backup .rev file to the the current .rev file?

Same confusion with Save in the IDE. When I hit save, what am I saving? The data in a card? The card format? Changes to the scripts associated with the card? Never been clear on that.

Pete

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 5:39 am
by FourthWorld
I use a different IDE so I can't comment on Rev's Undo, but as for save it saves everything in the stack file.

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 6:47 am
by phaworth
I guess what I don't understand in what happened today. Undo did not undo the delete of the group I just deleted so I closed the card and selected the "Don't Save" option. Opened the stack again and the layout of the card was as it was after I deleted the group. SO not only did the Undo not work but asking it to not save the card didn't work either.

I guess it's time to look at another IDE that keeps me from shooting myself in he foot. tRev? ANy others?

Pete

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 12:27 pm
by bn
Pete,
Rev has a very limited undo, as you found out. I rarely use it. Undo has a very short memory span, if you do undo after accidentally deleting an object it will restore it. As soon as you do anything in between Rev will not know what to undo.

As far as your "not saving" problem is concerned: Rev keeps stacks in memory. If you close a stack it is still in memory unless you had the destroy stack property set to true.

If, after closing a stack and the stack is not visible anymore and since is still in memory the go stack "myStack" command just makes this stack visible again (without the accidentally deleted group). It does not reload the stack from the last saved version. That is what the "revert to saved..." command in the file menu is for.

This command will restore your current stack to the version that was last saved. You could call this a kind of wholesale undo.

I save stacks regularily during development for this reason. If something goes wrong, like accidentally deleting an object or a newly introduced inifinite loop I can revert to the saved version.
I hope that this makes Rev's behaviour a little more understandable and with a little change of habits this works out quite well.

regards
Bernd

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 1:35 pm
by BvG
Also note that there is a setting that asks you what to do with stacks that have destroystack set to false. And a setting to have destroystack be the default for new stacks.

I tend to reopen stacks often, and rarely quit Rev. By setting those two settings your own stack will be removed from memory whenever you close them, and foreign stacks (or old ones) that have destroystack set to false will pop up a dialog about what to do, whenever you close their window.

That way Rev behaves much more like a document application (ie. text edit or word), and less like... nothing else I ever used. Using those settings makes using Rev less frustrating to me.

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 3:40 pm
by FourthWorld
Use the File-Revert to Saved command (or "revert this stack" in the Message Box) will purge the current copy in memory and reload the stack file from disk.

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 5:22 pm
by phaworth
Thanks for all the pointers, they will help avoid problems like this in the future. Revert to saved might be the answer to this but then again, that means having the discipline to do some sort of save that will update the.rev file, not just memory copies of stacks, on a regular basis. Sure wish there was some sort of auto-save feature in the IDE.

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 5:42 pm
by bn
Pete,
look in the Development Menu -> Plugins ->revSmartSave. It is a fairly old plug-in by Frédéric Rinaldi of Hypercard Externals Fame. You can set the auto-save interval from 10 secs to 10 mins. You can set it to auto-start in the Plugin Settings.You just have to decide whether you always want an autosave. Of course you also autosave all the intermediary and possibly unwanted steps. (There are some more gems among the plug-ins)
regards
Bernd

Re: Does Undo Undo or not!

Posted: Wed Mar 17, 2010 9:33 pm
by phaworth
Thanks Brend, I'll check it out. I think that along with my Time Machine backups that happen every hour should work nicely.
Pete