HISE Logo Forum
    • Categories
    • Register
    • Login

    Content.storeAllControlsAsPreset fixed ?

    Scheduled Pinned Locked Moved Scripting
    2 Posts 1 Posters 136 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.
    • ulrikU
      ulrik
      last edited by ulrik

      In this thread
      https://forum.hise.audio/topic/844/content-storeallcontrolsaspreset?_=1628784833271
      David asked about

      Content.storeAllControlsAsPreset 
      

      behaving odd when trying to overwrite existing file.
      I've noticed the same behaviour.

      @Christoph-Hart, will this be taken care of or should we use another way?

      I want to save the app/plugins state without user interaction, the plugin contains information in panels that needs to be remembered when it's open next time.
      What is the best way to do that?

      I've tried to use

      Engine.saveUserPreset("UserState");
      

      but it will always display a popup asking if I really want to overwrite the already save preset, and I don't want that behaviour.
      I want it to be saved quitetly in the background

      Hise Develop branch
      MacOs 15.3.1, Xcode 16.2
      http://musikboden.se

      ulrikU 1 Reply Last reply Reply Quote 0
      • ulrikU
        ulrik @ulrik
        last edited by

        @ulrik Ok, I solved it with

        Engine.loadFromJSON()
        

        and

        Engine.dumpAsJSON()
        

        I collected all Panel.getValue()'s and stored them as objects and could get them back after a new start of the app.

        So instead of manually script all getValues and setValues, would it be possible to collect all components values in one go, like you can with

        Content.storeAllControlsAsPreset
        

        and then save it with Engine.dump...?

        Hise Develop branch
        MacOs 15.3.1, Xcode 16.2
        http://musikboden.se

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

        20

        Online

        1.8k

        Users

        12.0k

        Topics

        104.8k

        Posts