HISE Logo Forum
    • Categories
    • Register
    • Login

    Populate samplemaps based on folder choice(almost working)

    Scheduled Pinned Locked Moved Scripting
    25 Posts 5 Posters 1.3k 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.
    • d.healeyD
      d.healey @ten7kur
      last edited by

      @ten7kur said in Populate samplemaps based on folder choice(almost working):

      bump.
      Anyone?

      At least the simplest of question;
      Why wont a viewport clear its items with:

      Viewport.set("items", "");
      

      ??
      Thanks

      I think it's a bug. i just did a simple test and you're right, it doesn't work.

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

      ustkU ten7kurT 2 Replies Last reply Reply Quote 0
      • C
        coreyu21 @ten7kur
        last edited by

        @ten7kur possibly try to insert viewport.changed somewhere in the code to tell the component to initiate the callback and update item list. I believe I had the viewport updating not to long ago, just not in an if statement. Might not work, just trying to help🙂

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

          @d-healey Apparently, you need to have at least something as a workaround,
          like Viewport.set("items", "-"); or Viewport.set("items", "Select a category");

          I think .isNotEmpty() is the cause:

          void ScriptingApi::Content::ScriptedViewport::setScriptObjectPropertyWithChangeMessage(const Identifier &id, var newValue, NotificationType notifyEditor /* = sendNotification */)
          {
          	if (id == getIdFor(Items))
          	{
          		jassert(isCorrectlyInitialised(Items));
          
          		if (newValue.toString().isNotEmpty())
          		{
          			currentItems = StringArray::fromLines(newValue.toString());
          		}
          	}
          
          	ScriptComponent::setScriptObjectPropertyWithChangeMessage(id, newValue, notifyEditor);
          }
          

          I'll try to remove it...

          Can't help pressing F5 in the forum...

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

            @coreyu21 said in Populate samplemaps based on folder choice(almost working):

            possibly try to insert viewport.changed somewhere in the code to tell the component to initiate the callback and update item list

            Tried it but no luck..
            I looked in the API, found "changed()" but it seems like it exists for all components Besides the Viewport..

            @ustk said in Populate samplemaps based on folder choice(almost working):

            I'll try to remove it...

            🙏 🙏

            ustkU 1 Reply Last reply Reply Quote 0
            • ustkU
              ustk @ten7kur
              last edited by

              It works by commenting out the .isNotEmpty() condition
              @d-healey I'll make a pull request to your fork in a moment if you want this fix of course...
              The fact is that I don't know if it can involve a wrong behavior somewhere else in Hise, so, be warned if you use it!

              Can't help pressing F5 in the forum...

              1 Reply Last reply Reply Quote 0
              • ustkU
                ustk
                last edited by

                @d-healey What branch should I use in your fork? The develop seems more recent than the scriptnode one...

                Can't help pressing F5 in the forum...

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

                  @ustk yeah the develop one

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

                  1 Reply Last reply Reply Quote 1
                  • ten7kurT
                    ten7kur
                    last edited by ten7kur

                    ☺
                    @ustk You're a beast! for goin nitty gritty!
                    Wish i could be more code efficient!..not yet!

                    ustkU 1 Reply Last reply Reply Quote 1
                    • ustkU
                      ustk @ten7kur
                      last edited by

                      @ten7kur It's pushed on Dave's repo, you can compile it and test ;)
                      https://github.com/davidhealey/HISE/tree/develop

                      Can't help pressing F5 in the forum...

                      ten7kurT 1 Reply Last reply Reply Quote 1
                      • ten7kurT
                        ten7kur @ustk
                        last edited by

                        @ustk said in Populate samplemaps based on folder choice(almost working):

                        @ten7kur It's pushed on Dave's repo, you can compile it and test ;)
                        https://github.com/davidhealey/HISE/tree/develop

                        Awesome stuff! Just compiled and tested it!
                        Thanks so much for taking your time to fix this!!👑

                        Hopefully now i can finish my script

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

                        19

                        Online

                        1.7k

                        Users

                        11.8k

                        Topics

                        102.5k

                        Posts