Content.storeAllControlsAsPreset fixed ?



  • 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



  • @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...?


Log in to reply
 

9
Online

1.6k
Users

4.6k
Topics

42.5k
Posts