Nested operations
-
I think I know the answer, and the answer is no, but I figured I'd check.
Can you nest start_operation, commit_operation calls? For example:model.start_operation "Operation A" #do something model.start_operation "Operation B" #do some more stuff model.commit_operation #ending operation B #do some final stuff model.commit_operation #ending operation AI figure the answer is that it at least won't work the way I want. What I would expect is that the outermost start / commit (Operation A), would be the only one exposed in the Undo / Redo because it contains Operation B within it. But what I think I see is that both A and B show up in the menu. This seems bad, because it implies that some operations from A are either being attributed to B, or being handled outside all the operations entirely. Anyway, does anyone know a more official explanation? The API, as usual, says very little on the subject.

-
No, you cannot do nest commits. Assume the behavior is undefined.
-
Ok. thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better π
Register LoginAdvertisement