Forum
    • Categories
    • Register
    • Login

    getChildComponents returns all descendents

    Scheduled Pinned Locked Moved Bug Reports
    11 Posts 4 Posters 65 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.
    • ustkU
      ustk @David Healey
      last edited by

      @David-Healey or perhaps adding an optional parameter bool recursive?

      Hise made me an F5 dude, any other app just suffers...

      Christoph HartC 1 Reply Last reply Reply Quote 1
      • Christoph HartC
        Christoph Hart @ustk
        last edited by

        Changing the function signature is a breaking change too, but I think a preprocessor is weird for that, just add another function. The hard thing is to come with a non-weird name for it, my best attempt is getDirectChildComponents()

        ustkU dannytaurusD 2 Replies Last reply Reply Quote 1
        • ustkU
          ustk @Christoph Hart
          last edited by

          @Christoph-Hart so why not with a bool recursive if you make a new one? so it can do both until we can safely retire the old one in a few years...

          Hise made me an F5 dude, any other app just suffers...

          1 Reply Last reply Reply Quote 0
          • dannytaurusD
            dannytaurus @Christoph Hart
            last edited by

            @Christoph-Hart @ustk How about two new functions:

            getDirectChildComponents()
            getRecursiveChildComponents()
            

            and a nice loud deprecated console message on the existing getChildComponents() function?

            Seems better to eventually end up with non-confusing function names rather than carry the confusing one on forever?

            HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
            Meat Beats: https://meatbeats.com
            Klippr Video: https://klippr.video

            dannytaurusD 1 Reply Last reply Reply Quote 0
            • dannytaurusD
              dannytaurus @dannytaurus
              last edited by

              Or why not just change the function signature for getChildComponents() as a breaking change?

              It would fail to compile, so it would be a nice loud error with a very easy fix for each dev currently using it.

              HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
              Meat Beats: https://meatbeats.com
              Klippr Video: https://klippr.video

              David HealeyD 1 Reply Last reply Reply Quote 1
              • David HealeyD
                David Healey @dannytaurus
                last edited by

                Or just make the function do what the documentation says it should do :p Also a breaking change but probably one that won't affect many people.

                Then add a new function to get all descendents.

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

                dannytaurusD 2 Replies Last reply Reply Quote 0
                • dannytaurusD
                  dannytaurus @David Healey
                  last edited by

                  @David-Healey If you're making a breaking change, why not roll the optional boolean in there too?

                  Same effect as without it (breaks compiling) plus a minimal doc change for a nice tidy, truthful function.

                  HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                  Meat Beats: https://meatbeats.com
                  Klippr Video: https://klippr.video

                  1 Reply Last reply Reply Quote 0
                  • dannytaurusD
                    dannytaurus @David Healey
                    last edited by dannytaurus

                    @David-Healey Where are you using getChildComponents()? On a Script object (ScriptButton, etc)?

                    Because ContainerChild already has getAllComponents() here but nothing else has it.

                    HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                    Meat Beats: https://meatbeats.com
                    Klippr Video: https://klippr.video

                    David HealeyD 1 Reply Last reply Reply Quote 0
                    • David HealeyD
                      David Healey @dannytaurus
                      last edited by

                      @dannytaurus In the script I'm currently working on I'm using it with a panel.

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

                      dannytaurusD 1 Reply Last reply Reply Quote 0
                      • dannytaurusD
                        dannytaurus @David Healey
                        last edited by

                        @David-Healey 👍

                        HISE dev latest / super.engineering + Claude Fable / Figma + Affinity
                        Meat Beats: https://meatbeats.com
                        Klippr Video: https://klippr.video

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

                        28

                        Online

                        2.5k

                        Users

                        13.9k

                        Topics

                        121.0k

                        Posts