• Login
sketchucation logo sketchucation
  • Login
⚠️ Libfredo 15.4b | Minor release with bugfixes and improvements Update

Nested operations

Scheduled Pinned Locked Moved Developers' Forum
3 Posts 2 Posters 231 Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    avariant
    last edited by 29 Jan 2009, 16:19

    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 A
    

    I 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. 😉

    1 Reply Last reply Reply Quote 0
    • T Offline
      todd burch
      last edited by 29 Jan 2009, 17:42

      No, you cannot do nest commits. Assume the behavior is undefined.

      1 Reply Last reply Reply Quote 0
      • A Offline
        avariant
        last edited by 29 Jan 2009, 19:27

        Ok. thanks!

        1 Reply Last reply Reply Quote 0
        • 1 / 1
        1 / 1
        • First post
          1/3
          Last post
        Buy SketchPlus
        Buy SUbD
        Buy WrapR
        Buy eBook
        Buy Modelur
        Buy Vertex Tools
        Buy SketchCuisine
        Buy FormFonts

        Advertisement