HISE Logo Forum
    • Categories
    • Register
    • Login

    Completely flummoxed over panel value...

    Scheduled Pinned Locked Moved Scripting
    4 Posts 2 Posters 52 Views
    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.
    • VirtualVirginV
      VirtualVirgin
      last edited by

      I have been scratching my head for a couple of hours on this, and I just don't understand!

      I am trying to use the panel with the undo system, and here I am getting the old panel value before setting the new panel value, but my old value is always identical to the new value!!!!

      Screenshot 2025-08-04 at 2.30.26 PM.png

      The line below the Console prints is

      NotationPanel.setPanelValueWithUndo(oldValue, newValue , "set");
      

      This line is the only place in the entire project that is setting the panel value.
      There are no other calls to .setPanelValueWithUndo or .setValue.

      How is it at all possible that NotationPanel.getValue is always returning the new value before it is ever even set?

      You can listen to my orchestral mockups here:
      https://www.virtualvirgin.net/

      ustkU 1 Reply Last reply Reply Quote 0
      • ustkU
        ustk @VirtualVirgin
        last edited by

        @VirtualVirgin are you able to reproduce the issue in a minimal snippet?

        Can't help pressing F5 in the forum...

        VirtualVirginV 1 Reply Last reply Reply Quote 0
        • VirtualVirginV
          VirtualVirgin @ustk
          last edited by

          @ustk apparently it has to do with transferring an array reference. I tried this

          local newValue = scribeData.clone();
          

          instead of this

          local newValue = scribeData;
          

          And now it works (the old value is properly being retrieved)...
          But I am not quite sure why as I am lost in the puzzle of how the array references operate in this case.

          You can listen to my orchestral mockups here:
          https://www.virtualvirgin.net/

          ustkU 1 Reply Last reply Reply Quote 0
          • ustkU
            ustk @VirtualVirgin
            last edited by

            @VirtualVirgin hard to tell without knowing what scribeData is

            Can't help pressing F5 in the forum...

            1 Reply Last reply Reply Quote 0
            • First post
              Last post

            29

            Online

            1.9k

            Users

            12.2k

            Topics

            106.5k

            Posts