HISE Logo Forum
    • Categories
    • Register
    • Login

    Persistence values - still cant get this to work

    Scheduled Pinned Locked Moved General Questions
    21 Posts 4 Posters 1.9k 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.
    • ossian1961O
      ossian1961 @Lindon
      last edited by

      @Lindon A variable usually will be initialized (so the value = 0) and if you write a code where a variable never be initialized it will return weird values, that's the basics of correct programming.

      https://www.kontakthub.com/label/Imagik-Sound/
      https://mirtklaar.bandcamp.com/

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

        @ossian1961 Thank you - I bow to your superior programming skills, can you point out which of the variables I have declared has not got an initial value?

        heres the init variable definition section

        
        const var AuthPanel = Content.getComponent("AuthPanel");
        const var AuthInstructions = Content.getComponent("AuthInstructions");
        const var AuthNumber1 = Content.getComponent("AuthNumber1");
        const var AuthNumber2 = Content.getComponent("AuthNumber2");
        const var AuthNumber3 = Content.getComponent("AuthNumber3");
        const var AuthNumber4 = Content.getComponent("AuthNumber4");
        const var AuthoriseButton = Content.getComponent("AuthoriseButton");
        const var FactoryPresetFlag = Content.getComponent("FactoryPresetFlag");
        const var AuthValues = Content.getComponent("AuthValues");
        
        
        
        var CR_Auth = false;
        var doingValidation = false;
        
        

        HISE Development for hire.
        www.channelrobot.com

        ossian1961O 1 Reply Last reply Reply Quote 0
        • ossian1961O
          ossian1961 @Lindon
          last edited by

          @Lindon said in Persistence values - still cant get this to work:

          @ossian1961 Thank you - I bow to your superior programming skills, can you point out which of the variables I have declared has not got an initial value?

          heres the init variable definition section

          
          const var AuthPanel = Content.getComponent("AuthPanel");
          const var AuthInstructions = Content.getComponent("AuthInstructions");
          const var AuthNumber1 = Content.getComponent("AuthNumber1");
          const var AuthNumber2 = Content.getComponent("AuthNumber2");
          const var AuthNumber3 = Content.getComponent("AuthNumber3");
          const var AuthNumber4 = Content.getComponent("AuthNumber4");
          const var AuthoriseButton = Content.getComponent("AuthoriseButton");
          const var FactoryPresetFlag = Content.getComponent("FactoryPresetFlag");
          const var AuthValues = Content.getComponent("AuthValues");
          
          
          
          var CR_Auth = false;
          var doingValidation = false;
          
          

          Oh you don't need to bow because I get not a superior programming skill at all ;)

          https://www.kontakthub.com/label/Imagik-Sound/
          https://mirtklaar.bandcamp.com/

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

            @ossian1961 OK, but where is this variable that remains un-initialised that you mentioned?

            HISE Development for hire.
            www.channelrobot.com

            ossian1961O 1 Reply Last reply Reply Quote 0
            • ossian1961O
              ossian1961 @Lindon
              last edited by

              @Lindon said in Persistence values - still cant get this to work:

              @ossian1961 OK, but where is this variable that remains un-initialised that you mentioned?

              When I wrote "A variable usually will be initialized (so the value = 0) and if you write a code where a variable never be initialized it will return weird values, that's the basics of correct programming." I wrote something is related to programming I'mnot talking about your code, you was talking about your plugin returned a 0-0-0-0 value, not me ;)

              https://www.kontakthub.com/label/Imagik-Sound/
              https://mirtklaar.bandcamp.com/

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

                @ossian1961 whA?

                Did you look at the snippet at all?

                You will see its configuring a text for display that shows
                0-0-0-0
                when it should show
                12345-12345-0-0

                HISE Development for hire.
                www.channelrobot.com

                ossian1961O 1 Reply Last reply Reply Quote 0
                • ossian1961O
                  ossian1961 @Lindon
                  last edited by

                  @Lindon said in Persistence values - still cant get this to work:

                  @ossian1961 whA?

                  Did you look at the snippet at all?

                  You will see its configuring a text for display that shows
                  0-0-0-0
                  when it should show
                  12345-12345-0-0

                  Yes I saw that and you right that it's weird, but I really don't understand just one thing that is why you chosen the preset to relate a protection of the whole plugin and so you asked for a persistent storage of an authorisation in the preset and not in the whole plugin. My first question is started by that.

                  https://www.kontakthub.com/label/Imagik-Sound/
                  https://mirtklaar.bandcamp.com/

                  1 Reply Last reply Reply Quote 0
                  • ossian1961O
                    ossian1961
                    last edited by

                    @Lindon I write you that because, just to make that a label shows the current preset it has been hard and I needed many comments exchanges before a solution :)

                    https://www.kontakthub.com/label/Imagik-Sound/
                    https://mirtklaar.bandcamp.com/

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

                      Frankly Im not bothered about using presets right now I just want HISE to save and recall the state of a widget.

                      HISE Development for hire.
                      www.channelrobot.com

                      ossian1961O 1 Reply Last reply Reply Quote 0
                      • ossian1961O
                        ossian1961 @Lindon
                        last edited by

                        @Lindon said in Persistence values - still cant get this to work:

                        Frankly Im not bothered about using presets right now I just want HISE to save and recall the state of a widget.

                        I'd like it too. I remember, for exemple, that in the old release when you put a widget on the GUI you created, the code of that appeared on the script, that was like a "RAD" programming ide, but Christoph took off this feature in the new release we use and now I feel the widget palette a bit "weird" because when you add a widget through the script, obviously the properties used in the script are not available to modify in the palette, but only through the script, so at the moment the script-Widgets palette looks a bit "ambiguous" system. Anyway, Hise is under costant development and I have faith in Christoph skills, I'm sure he will give a more logic and stable nature to his wonderful creature :)

                        https://www.kontakthub.com/label/Imagik-Sound/
                        https://mirtklaar.bandcamp.com/

                        1 Reply Last reply Reply Quote 0
                        • Christoph HartC
                          Christoph Hart
                          last edited by

                          but Christoph took off this feature in the new release

                          Do you mean this change: https://github.com/christophhart/hise_documentation/blob/master/NewInterfaceDesigner.md

                          In retrospective this is one of the best improvements I made to HISE, the old boilerplate JSON code was terrible and ugly.

                          Sure there are a few hiccups, but I still think it's the best way to combine a WYSIWYG editor with scripting.

                          d.healeyD ossian1961O 2 Replies Last reply Reply Quote 3
                          • d.healeyD
                            d.healey @Christoph Hart
                            last edited by

                            @Christoph-Hart said in Persistence values - still cant get this to work:

                            In retrospective this is one of the best improvements I made to HISE, the old boilerplate JSON code was terrible and ugly.

                            Took me some getting used to but definitely an improvement.

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

                            1 Reply Last reply Reply Quote 1
                            • ossian1961O
                              ossian1961 @Christoph Hart
                              last edited by

                              @Christoph-Hart said in Persistence values - still cant get this to work:

                              Sure there are a few hiccups, but I still think it's the best way to combine a WYSIWYG editor with scripting.

                              I think that the few hiccups could have not a solution for the nature itself of the way or I wrong? ;)

                              https://www.kontakthub.com/label/Imagik-Sound/
                              https://mirtklaar.bandcamp.com/

                              1 Reply Last reply Reply Quote 0
                              • Christoph HartC
                                Christoph Hart
                                last edited by

                                But what exactly is the hiccup we‘re talking about here? As soon as you set properties with a script, you obviously can‘t change it on the interface designer anymore because it would get overwritten each time you recompile the script.

                                If you want to batch process widgets once via script but then keep on editing the properties, wrap the property changes into a function and call it once, then comment it out so you can access them in the interface designer again.

                                ossian1961O 1 Reply Last reply Reply Quote 1
                                • ossian1961O
                                  ossian1961 @Christoph Hart
                                  last edited by

                                  @Christoph-Hart said in Persistence values - still cant get this to work:

                                  But what exactly is the hiccup we‘re talking about here? As soon as you set properties with a script, you obviously can‘t change it on the interface designer anymore because it would get overwritten each time you recompile the script.

                                  If you want to batch process widgets once via script but then keep on editing the properties, wrap the property changes into a function and call it once, then comment it out so you can access them in the interface designer again.

                                  Christoph I don't saying you souldn't take off the old way, I'm agree with you about creating averything through code writing is better and powerful (I started in that way before the RAD Ides), but why we need, so, to get a widgets palete? I thought it's no useful (it's only my personal opinion, don't take it as a request or a criticism) ;)

                                  https://www.kontakthub.com/label/Imagik-Sound/
                                  https://mirtklaar.bandcamp.com/

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

                                  52

                                  Online

                                  1.7k

                                  Users

                                  11.7k

                                  Topics

                                  101.9k

                                  Posts