HISE Logo Forum
    • Categories
    • Register
    • Login

    Persistence of widgets - problem

    Scheduled Pinned Locked Moved General Questions
    10 Posts 2 Posters 577 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.
    • LindonL
      Lindon
      last edited by Lindon

      Hey,

      I'm using a set of text widgets to hold numeric values - and using these numbers in my authorisation function.

      Now I'd like to run my authorisation function on init but I see from other threads Christoph says:

      "The persistent values of interface widgets are initialized after the onInit callback."

      So the question of the day is - when can I run this authorisation function?

      I tried in the on control call back

      simply saying:

          if (CR_Auth != true){
                  validateAuth();
              }
      

      but it seems when I get to the plugin itself - first time in it shows me the authorisation screen, takes my numbers and accepts my authorisation - and the instrument works fine, but if I unload the plugin and reload it - then these text fields are all set back to zero....it LOOKS like its not saving the text values....

      What am I doing wrong?

      HISE Development for hire.
      www.channelrobot.com

      1 Reply Last reply Reply Quote 0
      • d.healeyD
        d.healey
        last edited by

        Is this the HISE authorisation system or your own?

        Libre Wave - Freedom respecting instruments and effects
        My Patreon - HISE tutorials
        YouTube Channel - Public HISE tutorials

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey my own what's the hise one?

          HISE Development for hire.
          www.channelrobot.com

          d.healeyD 1 Reply Last reply Reply Quote 0
          • d.healeyD
            d.healey @Lindon
            last edited by

            @Lindon HISE has some kind of serial key system, I don't know much about it. Talk to Christoph :)

            Libre Wave - Freedom respecting instruments and effects
            My Patreon - HISE tutorials
            YouTube Channel - Public HISE tutorials

            LindonL 1 Reply Last reply Reply Quote 0
            • LindonL
              Lindon @d.healey
              last edited by

              @d-healey - oh that one, well I have, its a "call-home" system using a server (Well I think it is) and that is only second in the "most unpopular authorisation systems" to PACE.

              So its a no go.

              So back to my original question: how do I get widget values to persist, and at what point in "plug-in start up" can I assume these have been initialised?

              HISE Development for hire.
              www.channelrobot.com

              1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon
                last edited by Lindon

                OK more experimentation.

                Its clear that the plugin is NOT persisting the state of widgets, unless I save the project (in my DAW), and even then ONLY in the saved project. Is it even supposed to - do I have this wrong?

                Where can I get some persistent storage ?

                Can I write to read from a file?

                I see I can loadFromJSON -- which would be ideal but there is no saveAsJSON that I can see

                HISE Development for hire.
                www.channelrobot.com

                1 Reply Last reply Reply Quote 0
                • d.healeyD
                  d.healey
                  last edited by

                  unless I save the project (in my DAW)

                  Are you building your instrument inside the VSTi version of HISE? I always use the standalone for building and the VSTi for testing.

                  All widgets with their SaveInPreset property set to true will have their values restored after the init callback has completed. Following that they all have their onControl callbacks triggered. So if you want to access a saved value after initialisation you need to do it inside an onControl callback.

                  Libre Wave - Freedom respecting instruments and effects
                  My Patreon - HISE tutorials
                  YouTube Channel - Public HISE tutorials

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @d.healey
                    last edited by Lindon

                    @d-healey I am building my plugin in the stand alone version of hise, then I'm loading my built plugin into my DAW (Tracktion or Reaper)

                    I dont dont dont want to save these widget/values in the user Presets. Sharing a preset between users would mean sharing authorisation keys - bad bad bad.

                    ..and if i did I would have no way of creating factory presets - they would all have zeros in the authorisation key - so when a user opened a factory preset hte authorisation would fail and they'd have to enter the auth keys again....very very bad.

                    HISE Development for hire.
                    www.channelrobot.com

                    d.healeyD 1 Reply Last reply Reply Quote 0
                    • d.healeyD
                      d.healey @Lindon
                      last edited by

                      @Lindon Then I think you'll need Christoph to create a write to JSON file function.

                      Libre Wave - Freedom respecting instruments and effects
                      My Patreon - HISE tutorials
                      YouTube Channel - Public HISE tutorials

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @d.healey
                        last edited by

                        @d-healey Thanks Dave.... in the meantime I will just have to get over myself... and try convince my customers that they wont really need authorisation (they already love the audio file protection in HISE)... I will create a post in the "Feature request" section...

                        HISE Development for hire.
                        www.channelrobot.com

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

                        47

                        Online

                        1.7k

                        Users

                        11.7k

                        Topics

                        101.8k

                        Posts