Forum
    • Categories
    • Register
    • Login

    Loading Presets with a ComboBox

    Scheduled Pinned Locked Moved General Questions
    3 Posts 2 Posters 501 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
      • 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

        pelleP 1 Reply Last reply Reply Quote 3
        • pelleP
          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

          20

          Online

          2.1k

          Users

          13.0k

          Topics

          112.4k

          Posts