HISE Logo Forum
    • Categories
    • Register
    • Login

    Loading Presets with a ComboBox

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 321 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.
    • pelleP
      pelle
      last edited by

      Hello everyone,
      I have tried loading user presets via a combobox but every time HISE crashes... does anyone know why?

      This is my script

      // PRESETS ///////////////////////
      const var Presets = Content.getComponent("Presets");
      var menuItems = [];
      
      const var x = Engine.getUserPresetList(); 
      for (i in x)
      	menuItems.insert(-1, i);
      
      menuItems = menuItems.join("\n");
      Presets.set("items", menuItems);
      
      inline function onPresetsControl(component, value)
      {
      	Engine.loadUserPreset(Presets.getItemText() + ".preset");
      };
      
      Content.getComponent("Presets").setControlCallback(onPresetsControl);
      

      Thanks

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

        If your combo box is set to save in preset enabled then it will create an endless loop and kaboooooom!

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

        pelleP 1 Reply Last reply Reply Quote 3
        • pelleP
          pelle @d.healey
          last edited by

          @d-healey Olè!!! ahahah that's it ...thanks dude

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

          19

          Online

          1.7k

          Users

          11.8k

          Topics

          102.4k

          Posts