Forum

    • Register
    • Login
    • Search
    • Categories

    Expansionhandler.refreshExpansions()

    General Questions
    2
    17
    130
    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.
    • DanH
      DanH last edited by

      How should I be using this function? It would be great if it kicks in after an expansion has been installed (via .hr1 file) but happy to have it on a button callback. I tried it both ways but didn't get it to do anything. Button callback below:

      inline function onREFRESHEXPControl(component, value)
      {
          if (value == 1)
          {
      	    expHandler.refreshExpansions();
          }
      
      };
      
      Content.getComponent("REFRESHEXP").setControlCallback(onREFRESHEXPControl);
      
      1 Reply Last reply Reply Quote 0
      • d.healey
        d.healey last edited by

        c5a36c27-990f-47b2-a196-7628356481cd-image.png

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

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

          @d-healey Sorry should have stated I read all the docs, but figured I'm doing something wrong in my callback as nothing happens.

          Anyone using this?

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

            @DanH Are you using ExpansionHandler.installFromPackage()?

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

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

              @d-healey yup

              inline function onINSTALLEXPControl(component, value)
              {
                  if (value == 1)
                  {
                      FileSystem.browse("", false, "", function(result)
                      {
                          hr = result;
              	        
                          FileSystem.browseForDirectory("", function(dir)
                          {
                              expHandler.installExpansionFromPackage(hr, dir);
                              //expHandler.refreshExpansions();
                          });
                      });
                  }
              };
              
              Content.getComponent("INSTALLEXP").setControlCallback(onINSTALLEXPControl);
              
              1 Reply Last reply Reply Quote 0
              • d.healey
                d.healey last edited by

                Then re-read the last paragraph (especially 3.) of the doc I posted 🙂

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

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

                  @d-healey so any idea why my expansion doesn't show up after installation then?! 😆

                  It didn't before I tried the refresh function

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

                    @DanH Is this in HISE or the compiled plugin?

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

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

                      @d-healey compiled

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

                        @DanH Did you restart the plugin after installing the expansion?

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

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

                          @d-healey yes, that's the only way it would show. I was expecting it to show right away (and then made a button to try and force it).

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

                            @DanH I think you have to restart, just like when you redirect samples.

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

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

                              @d-healey ok then 😆

                              Thanks!

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

                                @Christoph-Hart Actually refreshExpansions does seem to be broken. After I remove an expansion and call the function the expansion is still showing up.

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

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

                                  I've had a look at the source and it seems like Christoph intended to do something but didn't, or didn't clean up after himself.

                                  There is a variable called newList that is never used...

                                  Anyway I found out why it's not doing anything when I remove an expansion (not sure if there is a problem with adding yet, I think restarting the app is the intended, although clunky, behaviour).

                                  The refreshExpansions function is going through every expansion and adding them to the expansionList but if the expansion is already in the list it just skips it this means that if you remove an expansion (which must already be in the list) it will be ignored when doing the refresh and so will still be in the list.

                                  My suggestion @Christoph-Hart is to get rid of the check to see if the expansion is already in the list, and clear the list before entering the loop. I've just tested this and it works but what do you think/suggest?

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

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

                                    Christoph added an unloadExpansion function today into the new_layout branch that solves my issue 🙂

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

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

                                      @d-healey Nice. So I've been testing the install and for some reason the new expansions are showing in the plugin a few moments after installing, presets and samples all seemingly available and working - so that's good!

                                      EDIT - I think I figured it out, I have the Preset Browser set with the expansions column active at the moment, and the expansion appears there a few seconds after the expansion installation. So perhaps the refresh does work after all - just not quite how I wanted it 😆

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

                                      15
                                      Online

                                      982
                                      Users

                                      6.6k
                                      Topics

                                      60.8k
                                      Posts