When a script terminates before Undo_EndBlock() ... >>

Money Forum

Money Forum



SearchSearch   Users   Registration   Entrance
Today: 28.08.2025 - 14:57:46
Pages:  1  

When a script terminates before Undo_EndBlock() ...

Advertising


MessageAuthor

Just a question for JCS about whether or not it's possible to have improved handling of what happens to Reaper's undo system if a script that sets its own Undo_BeginBlock() ends at an error before reaching the corresponding end block. If it's not already being done, would it be possible for Reaper to force the end of an undo point if a script throws an error, to prevent the undo queue from getting messed up? I've noticed this when making my own scripts - occasionally (:p) one makes mistakes and gets errors, and currently this means we must re-open Reaper to sort out undo/redo behaviour. It would also improve the use of Reascripts for all users, as if a buggy script is run it won't corrupt their project without them realising :)

---------------------

mcornwell

money-user




Statistics:
Messages: 147
Registration: 10.22.2002
29.01.22 - 20:42:33
Message # 1
RE: When a script terminates before Undo_EndBlock() ...

You can use something like this to ensure execution of undo endblock: Code:

---------------------
E46 328Ci Carbon Fiber Everything

triggrhaapi

money-user




Statistics:
Messages: 82
Registration: 04.02.2003
29.01.22 - 20:50:43
Message # 2
RE: When a script terminates before Undo_EndBlock() ...

^ Ok (thanks I didn't know about contextmanager), but more to the point - wouldn't it be good for non-scrip-writing users, if this was done automatically, so that if they had a script that resulted in error, and hadn't been made like the above, reaper would protect them from it? I cannot imagine why, in a situation where a script is meant to set the end block, and doesn't because of an error, it would not be desirable for it to be sorted by Reaper - rather than just being added to the library, could it be built-in and automatic?

---------------------
Ciao! - - Nathan

Z3POWER

money-user




Statistics:
Messages: 988
Registration: 05.30.2002
29.01.22 - 20:55:45
Message # 3
RE: When a script terminates before Undo_EndBlock() ...
Editing a midi file : Previous topicNext topic: TCP FX list
Pages:  1  

Message
Name
Message

Click on the dot next to the name to address the participant

           
   
The administrator has prohibited guests from replying to messages! To register, follow the link: register


Participants