Forum
    • Categories
    • Register
    • Login

    Loading Presets with a ComboBox

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 550 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.
    • P
      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
      • David HealeyD
        David Healey
        last edited by

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

        Free HISE Bootcamp Full Course for beginners.
        YouTube Channel - Public HISE tutorials
        My Patreon - HISE tutorials

        P 1 Reply Last reply Reply Quote 3
        • P
          pelle @David Healey
          last edited by

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

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

          11

          Online

          2.2k

          Users

          13.4k

          Topics

          117.1k

          Posts