[L2Ork-dev] dynamic patching and undo/redo system
aggraef at gmail.com
Thu Jul 30 15:08:05 EDT 2020
I'm amazed that undo/redo works as well as it does, with everything that's
going on in a complex system like Pd.
For now, it seems that certain operations just have to clear the undo
history, to prevent crashes further down the road. Maybe also warn the user
about this the first time a patch calls any of these operations.
On Mon, Jul 27, 2020 at 3:48 AM Jonathan Wilkes <jon.w.wilkes at gmail.com>
> Hi all,
> It appears that dynamic patching nnd the undo system are irreconcilable.
> For example-- Suppose you do this:
> [namecanvas foo]
> [obj 20 20 clip(
> [send foo]
> Whenever you click the message box, a new object will be created but
> without any undo history.
> That's probably desirable behavior, as we don't want a bunch of
> dynamically created gumming up the undo system.
> However, the undo system is based off object indices. So by inserting
> "[clip]" into a glist we corrupt that system. You can see this if
> dynamic patching in the middle of other editing actions. Doing undo
> then redo will put the patch in a corrupt state because the indices
> will be off by one due to the "[clip]" object that the undo system
> didn't expect.
> I don't know any clean way to deal with this. But it affects more than
> dynamic patching:
> [20 20 $1(
> [append some_scalar x y]
> Same problem there, as well as:
> [next, delete(
> [pointer some-scalar]
> Each one breaks the assumptions of the undo system and undo/redo
> actions can have wrong indices.
> Even more pressing-- now that we've got pointer delete method, the
> undo system can have an out-of-bounds index and crash when it tries to
> deference a null pointer.
> Any ideas on how to approach this?
> L2Ork-dev mailing list
> L2Ork-dev at disis.music.vt.edu
Dr. Albert Gr"af
Computer Music Research Group, JGU Mainz, Germany
Email: aggraef at gmail.com, web: https://agraef.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the L2Ork-dev