HISE Logo Forum
    • Categories
    • Register
    • Login

    myPanel.get("childComponents") - seems not to work

    Scheduled Pinned Locked Moved General Questions
    11 Posts 3 Posters 434 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.
    • LindonL
      Lindon
      last edited by

      is there a way to get an array of all child components of a panel?

      HISE Development for hire.
      www.channelrobot.com

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

        Yes, what do you want to do with them?

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

        LindonL 1 Reply Last reply Reply Quote 0
        • LindonL
          Lindon @d.healey
          last edited by

          @d-healey I want to pass the panel to a function, that iterates through the components setting them to a value

          HISE Development for hire.
          www.channelrobot.com

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

            @Lindon Are the children panels too?

            Hise made me an F5 dude, browser just suffers...

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

              HiseSnippet 995.3ocsVEtaaaCDlzwLqVctnEnO.Z9W1.cAxascaHnXt1wYvHMIFyYECXankVh1hMRjBRTswnHX8G626YX.6EqOB6MX6njrEcmhmqAl9kti22ce73w633XoKKIQFivMtXQDCg+TxjEBk+.eJWfFcDBeGxozDEK1NWU+EQzjDlGBi266zJvMpix99qusOMfJbYkpPnmK4trmwC4pRsi6cBOH3XpG6Bdng0Or2HWoXfLPlB7YOhCJh5dIcN6Lp1rZDDd+gdbkLdhhpXIfM8kdKl3KeiH29myS3SCXZgtnIfixUiF3yC7FubulfP35iK246kuyuO4TtGek9xLvcyVvtDgYN.WacJUeMJ08lnzwx.OsCtA5gMnW8b5cOxD2XdjpbEM2tMYj.NblQgztIsxsEU62wjARvBg5fP5kriiAgUHZ+XGmGX+HGmNG1zpoULatsqlJwLg8Sr+oeIS6LYrcaWatvdoilyTOMHXfLLRJ.4j1sZ0oSSq21zxF93y.y01ztUDE7jZkgs5X+YOwt0XpfEzEDfCaEWjxNLG3xPePTZhea2NGZc85weoAcxsGnShLfcPTLWnVFRtGvkCmkJbUbovVJNSpXmKZ2w5sVMrt1x9CWZ1rJWSuWikAAr3JWVW3FuIfsEogSYwOv90zfT1JCgSy0KW1e6JWbyS8FFJEiDb04QrB4xBptUTPgJN6zU9ELDLUkUXcmhBq9oJkTf3fSZPxE5hxnu4EZzMAeR.2iEmA+SHmHjS2Fv2s.LTiLU1WdUF7aSVJtQWTO2EMKbwETcdSi+Vjr+q.rGUQyZjf9gQGo+GtpTjYfrUDKVw0GJ3iXuFZakeuqA4HVxkJYTVpqnTFN3VO5YE0EQOu.Gc0pH+ty6svr82a3dJeDlf+SLB4y3y8UZoeCjv6YDCxVb.UFEz2XFkg89faeFLCcywnhSwxH7xPiH7tS1xHr+VdTarS9Yi379W0KjdkN+nk1tP9eWZTFrd+p4lZRuM3mQgvvnB+j8uoeduoe9ioaxOOiNcUwR1+qUrbsoetrG5eOJ.FHI8RCnp0mRoGGWr.zKZswA5V9hDtZg435OhQWNUN5pxNMaIcuGYLW45WMeqUAeg6F+ey2hGBzjLb1Llqpjr0IG+i65T+OBp78xTXf37SopXtth+rzvIvagbY.SDPQdh9VPMcOvbYmk2JlvDdYB+M7UrXWsLtXwtKWDERcikuvMuIp9oF2JSCvIQ1qrZ.O2CjsW08jPbNvAEBu.5Ett5TwmCbuZLewNf4K2ALObGv7nc.yi2ALe0Nf4q2HF8iOeZpRFleMATLdX1vKLdnP2MKqhD8O7KFOzF
              

              In this example I'm adding the children to an array but you could work on them directly in the loop instead.

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

              LindonL 1 Reply Last reply Reply Quote 0
              • LindonL
                Lindon @d.healey
                last edited by

                @d-healey said in myPanel.get("childComponents") - seems not to work:

                HiseSnippet 995.3ocsVEtaaaCDlzwLqVct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eg6F+ey2hGBzjLb1Llqpjr0IG+i65T+OBp78xTXf37SopXtth+rzvIvagbY.SDPQdh9VPMcOvbYmk2JlvDdYB+M7UrXWsLtXwtKWDERcikuvMuIp9oF2JSCvIQ1qrZ.O2CjsW08jPbNvAEBu.5Ett5TwmCbuZLewNf4K2ALObGv7nc.yi2ALe0Nf4q2HF8iOeZpRFleMATLdX1vKLdnP2MKqhD8O7KFOzF

                OK thanks - but thats a nightmare of components to trawl through....(every component in my plugin - and its big) so I will have to find another way...

                HISE Development for hire.
                www.channelrobot.com

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

                  @Lindon You can use regex with the Content.getAllComponents(); to try to narrow it down a bit. You can also do it once in on init and store all your references in arrays/variables so there is no overhead once the plugin is loaded.

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

                  LindonL 1 Reply Last reply Reply Quote 0
                  • LindonL
                    Lindon @d.healey
                    last edited by

                    @d-healey - yeah but I may as well just reference the widgets directly and load them into an array on init - its hardly any more work - and actually less in the init (but we are talking microseconds here..) Thanks anyway..

                    HISE Development for hire.
                    www.channelrobot.com

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

                      @Lindon if your children are panels then use childPanel() might be the solution

                      Hise made me an F5 dude, browser just suffers...

                      LindonL 1 Reply Last reply Reply Quote 0
                      • LindonL
                        Lindon @ustk
                        last edited by

                        @ustk sadly they are not.

                        HISE Development for hire.
                        www.channelrobot.com

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

                          @lindon Digging up this old thread as I was looking for something else. Just thought I'd let you know that I added a Panel.getChildComponents() function a few weeks ago. https://github.com/christophhart/HISE/pull/235

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

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

                          22

                          Online

                          2.0k

                          Users

                          12.7k

                          Topics

                          110.1k

                          Posts