HISE Logo Forum
    • Categories
    • Register
    • Login

    ComboBox 'restoreState():' - help

    Scheduled Pinned Locked Moved Solved Scripting
    4 Posts 1 Posters 208 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.
    • ChazroxC
      Chazrox
      last edited by

      It seems like this would be simple because in the same project I have eq states that properly
      execute from combobox values...what am I doing wrong or missing here? Pls. hlp. should be simple.

      namespace SpaceReverbComboBox
      {
      
      // Elements
      const var cmbSpaceReverb = Content.getComponent("cmbSpaceReverb"); // ComboBox
      const var SimpleReverb1 = Content.getComponent("Simple Reverb1"); // Reverb
      const var knbReverbGain = Content.getComponent("knbReverbGain"); // Reverb GainKnob
      
      // Base64 String Export State
      const var AllAlone = ("265.3ocSOFqSCCCDF9LgLzEDC7.vHiMpO.F0FPBIJpJFQWIs9DwRN4hrc.Rm3Mf4twS.6rg3k.0YXkQlAmVWAd59990+oySLzbzZICv5cYaMBr8hEpxZMlg2hlYvYo.a+f5vMtDXXact0hRfwhxHpTnV3a1aW.fqe7su3o4k0ppaBpiGL3C9TzctusN3d86i9jmZZ+u6gCd9c9TkzUDDOsb4J9oFDWfiII9m8ENK5DoxQFgK2gVfEMjjshB5tJ+bbBbkxplowMffzT2Te.FUnzxIa+zV+5xnFm+VGm6Lp6AV7EMkBpwLGGUjWUgZ+xiY6.cUWy86XOBBrRtF9w+BgIcLKDlrMD9EDorYLC");
      
      // Function
      inline function oncmbSpaceReverbControl(component, value)
      {
      	if (value == 1)
      	{
      		SimpleReverb1.restoreState(AllAlone);		
      		knbReverbGain.updateFromProcessorConnection();
      		cmbSpaceReverb.changed();
      		
      	}
      };
      
      Content.getComponent("cmbSpaceReverb").setControlCallback(oncmbSpaceReverbControl);
      
      // PROBLEM: Combobox not restoring export states to 'Simple Reverb1'...? What am I doing wrong?
      
      
      }
      
      1 Reply Last reply Reply Quote 0
      • ChazroxC
        Chazrox
        last edited by

        Essentially all I did was add

        SimpleReverb1.exportState():

        within the code block and everything started working.

        its not even necessary to the function (atleast I dont believe so because its not being refferenced). I only have that written to grab more 'exportState's using Console.print.. . Generally its commented out, but for some reason leaving it in made it work.

        1 Reply Last reply Reply Quote 0
        • ChazroxC
          Chazrox
          last edited by

          Here it is.
          3dgifmaker34119.gif

          1 Reply Last reply Reply Quote 0
          • ChazroxC Chazrox has marked this topic as solved on
          • ChazroxC
            Chazrox
            last edited by

            Im marking this as solved but im still not sure what the cause of the problem in the first place even was. Even tho I got it working, im gonna leave this up in case anybody wants to enlighten me.

            Thanks!

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

            26

            Online

            1.8k

            Users

            12.0k

            Topics

            104.6k

            Posts