HISE Logo Forum
    • Categories
    • Register
    • Login

    Get "this" for current component in Global laf

    Scheduled Pinned Locked Moved General Questions
    40 Posts 4 Posters 1.6k 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.
    • ulrikU
      ulrik
      last edited by

      Is it possible to get the hands on current component inside the global look and feel function?
      "this" and "obj" doesn't work

      Hise Develop branch
      MacOs 15.3.1, Xcode 16.2
      http://musikboden.se

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

        @ulrik you might get it with Content.getComponent(obj.id)

        ulrikU 3 Replies Last reply Reply Quote 2
        • ulrikU
          ulrik @Christoph Hart
          last edited by

          @Christoph-Hart thank you :)

          Hise Develop branch
          MacOs 15.3.1, Xcode 16.2
          http://musikboden.se

          clevername27C 1 Reply Last reply Reply Quote 0
          • ulrikU
            ulrik @Christoph Hart
            last edited by

            @Christoph-Hart unfortunately obj.id doesn't return the id

            ! Component with name  wasn't found.
            

            Hise Develop branch
            MacOs 15.3.1, Xcode 16.2
            http://musikboden.se

            1 Reply Last reply Reply Quote 0
            • ulrikU
              ulrik @Christoph Hart
              last edited by

              @Christoph-Hart In this example, "Console.print(obj.id);"
              will log

              Skärmavbild 2023-05-02 kl. 11.16.42.png

              HiseSnippet 837.3ocsU0taSCCE0taFnElfI3AHZ+pSZT0tACjPH1VWKph8QEEPvulbStM0LG6HGmMpP6YgWQdCfqSZWRgxDpBxOr58ii6wWetW22n8gjDsgPq9tIw.gdO1fIJ631i4BEo2gD5CYgR8PtTp0myUAi.PRNXRLOIABHT5Ju1kHs5pjruu+pC3RtxGJbQHePK7giDQBag2968FgT1kG.uSDUJ6mrWOespsVpSQRsBqIIl6eNODNg6RqBiPuUm.gUaFX4VHgPW8.cvjAi0Wpxy+ChDwPI3LZQFfaTt6tZYfiwNuj1iExf9yN7IDbW5WTJVIuT7H1wh.w09KJIOHKfWAhx0CZk4o2JyQuVkoWyRzaAThVhRqlSo0YC7MhXaQDGetKqmxBlQbrrWlJ44Rp7MJqsFyPYaDwOG5ZPiqQTe2lM2xCW17E0pgk9Dq2EbiWetBjduzaFvPv1VGEqUnQ8MxhtQAhvi3ivj6nBEJnguAvy9qyjM4b3HT7ruJnKJdp6P4xugABEIHK5lp7sBsp9FAF9k80wowGCpzdVHZis7FMKZ3Vd5gedyZesVUjTIZIzH1HP1XMtigKFt0+RLzaCQ.5+pMewrcxSqNQagSU0y1rZWUy6WCMZzBi4JFFsTBlEF1ojM2Dv5pzngfYKrBKSgqSDudmWyv9yZlxRZ+76lRIpU8TB6owf5OIzISuPwe89dGxsbmPapOLuXvXENJPODt.6ZykcUYGBIma0wY4NUEPn2wlEcsYhRmnfHPo2sY4+9KE80h8lTX7o8tTDXGW1wXPDN1V1iajyksw0g3..jQ2msuT5U3HtrPIwMnBqc1V0bqamstCNl42ZgvlWcPpjamui1MFaZ.7Jat1HWqhJQXmTdL2+r17+VJtNquv5OdwbrxB3Hdw9+fiSGNtFqynQfusffqx59w+OSBIuUmZEpvi4Vi.0TrSRiFfuO3C3+tBEZtVFZEm3N2toy1UAF.pfLiefeSC1xYSmFr0rfjHtuQeledipa76cx7fbRk8xSU1wNauVjrlWDGqYiljH7kfy78cG+Gi8aKFy1KAlcVBLOYIv7zk.ytKAlmsDXd9Mhw8H79oVcTd6.5nemrIZTZGEGUVYpPxOwksC2L
              

              Hise Develop branch
              MacOs 15.3.1, Xcode 16.2
              http://musikboden.se

              ulrikU 1 Reply Last reply Reply Quote 0
              • ulrikU
                ulrik @ulrik
                last edited by

                @ulrik I'm on develop branch from April 3

                Hise Develop branch
                MacOs 15.3.1, Xcode 16.2
                http://musikboden.se

                ulrikU 1 Reply Last reply Reply Quote 0
                • ulrikU
                  ulrik @ulrik
                  last edited by

                  @ulrik If I remember right, obj.id returned "", but it was fixed some time ago, right?
                  But now it returns "" again

                  Hise Develop branch
                  MacOs 15.3.1, Xcode 16.2
                  http://musikboden.se

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

                    @ulrik I don't think it was ever fixed. But there is one or two control types that return the id in obj. For the rest you just get the text.

                    What property of the control do you need?

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

                    ulrikU 1 Reply Last reply Reply Quote 0
                    • ulrikU
                      ulrik @d.healey
                      last edited by

                      @d-healey what 2 types?
                      I need to get the component id, but it's ok if I could get the component text, then I could make a work around

                      Hise Develop branch
                      MacOs 15.3.1, Xcode 16.2
                      http://musikboden.se

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

                        @ulrik I can't remember which ones (it may have been a dream).

                        In your screenshot you show you are getting the text. But why do you need to get the component id?

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

                        ulrikU 1 Reply Last reply Reply Quote 0
                        • ulrikU
                          ulrik @d.healey
                          last edited by

                          @d-healey the text is the hovered text

                          Hise Develop branch
                          MacOs 15.3.1, Xcode 16.2
                          http://musikboden.se

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

                            @ulrik Aha that makes sense. But still, why do you need the ID? If you let me know what you want to achieve I might be able to suggest a workaround.

                            Also why are you using global and not local?

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

                            ulrikU 1 Reply Last reply Reply Quote 0
                            • ulrikU
                              ulrik @d.healey
                              last edited by

                              @d-healey said in Get "this" for current component in Global laf:

                              @ulrik Aha that makes sense. But still, why do you need the ID?

                              I need to get the panels value

                              If you let me know what you want to achieve I might be able to suggest a workaround.

                              Also why are you using global and not local?

                              I can't get the local look and feel to work, I guess I'm doing something wrong...

                              Hise Develop branch
                              MacOs 15.3.1, Xcode 16.2
                              http://musikboden.se

                              ulrikU d.healeyD 2 Replies Last reply Reply Quote 0
                              • ulrikU
                                ulrik @ulrik
                                last edited by

                                @ulrik If I could use the local LAF it would be no problem I guess, to get the component value or other properties

                                Hise Develop branch
                                MacOs 15.3.1, Xcode 16.2
                                http://musikboden.se

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

                                  @ulrik

                                  I can't get the local look and feel to work, I guess I'm doing something wrong...

                                  HiseSnippet 840.3ocsU01aSCCD1taFnEP.B9ADsOUjFUs7x.IDhs0thpXaTQAD7Ijqy0VScribbnTg3+E+r3e.bNocIk0gPUP9fUt64NmGe44N22ZDPRhwRnUey7XfPuFavbsaR6IbolzqCgda1XkYHWoLlobc3H.TjCmGySRfPBkt0K7ARqtMI64GO+PthqEPgKB4cFo.NVFIcEd6u+KkJUWdH7FYTone398DFcaixjhjZKVSRLWLkOFNk6CqBiPuzQgRmwNvwcPBgt8glv4ClXloyi+cxD4PE3MZQFfaTt6tFUnmwduj1Sjpv9KO7IDbW5WTJ1JuTbG1IxP4Y9KJI2LCHnHix0CZkUo2VqPuVkoWyRzaMThVhRamSoawFHrxXWAhmOWk0S6.6HNV1KSk7XIU9Nk01fQncMh3SgtVz3rLpuWyl6FfK28o0pgk9DWfhOJ3YAKSQXA7jbrQvUGiZfCzgcQMPce3XfMrvXYBtWcS0BmznquSnkOquINM9DPm1yAQ6ravnkni2MvL7S2s1WqUE+.IFEzH1J0t5NqmLdLbm+MLzaCYH5+aEj7ybaPetFTkn5Xv01DEaznQ8cxP2AyH6kFIf6bGB7.f3KIWfQepwAuRWOie09VsfeGZzn0h4If0nTfcsvdIt8OkXccZzPvtKdpTovYAh+2WULwtXwTYstHudTJPitmV5dULnunN.xhhH91a60g63dE3BeXbwf0I8Tf1A9L1NmqGqx5.IScl3rXWT4Izq3xPu9R0pu9Sjnl7xr72+RQCub+4EFeX+YxP2jxNl.xwSbk83mEMqMtNDmLfL5FrCTpfBGwk0dI9IXXsy0ple89YqO.m+btdKrq1Dlp3tUa08y2V.f+xVo+x2CoSjt4km+8Oq++ukh2h0W5DSVOGqrFNh+X+evwESMuN6nQi.gqffay599+OiHIu1j5j5wmvcVIpoXmlFM.u3P.3WWiBMeKCshWbma2za6q.C.cXlwOwmEfs71zEfsVBRh3Bq4ih7FU+b4qj4A4jN6JoprS71AsHYMuXdrlMZRhvqH9nP3O92C62VeN2eCx4AaPNObCx4QaPN6sA473MHmm7Gywe67AoNSTd6.5n+QYSznzizbTYkoBI+BPPUgGs
                                  

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

                                  ulrikU 2 Replies Last reply Reply Quote 0
                                  • d.healeyD
                                    d.healey @ulrik
                                    last edited by

                                    @ulrik Why do you need the value in the laf? Is it for styling purposes?

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

                                    ulrikU 1 Reply Last reply Reply Quote 0
                                    • ulrikU
                                      ulrik @d.healey
                                      last edited by

                                      @d-healey that's not working in my Hise

                                      Hise Develop branch
                                      MacOs 15.3.1, Xcode 16.2
                                      http://musikboden.se

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

                                        @d-healey said in Get "this" for current component in Global laf:

                                        @ulrik Why do you need the value in the laf? Is it for styling purposes?

                                        Yes

                                        Hise Develop branch
                                        MacOs 15.3.1, Xcode 16.2
                                        http://musikboden.se

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

                                          @ulrik said in Get "this" for current component in Global laf:

                                          @d-healey that's not working in my Hise

                                          Which version are you using?

                                          @ulrik said in Get "this" for current component in Global laf:

                                          @d-healey said in Get "this" for current component in Global laf:

                                          @ulrik Why do you need the value in the laf? Is it for styling purposes?

                                          Yes

                                          Well if you have the list of items in an array and you know what the selected text is, you could use indexOf to find the value.

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

                                          1 Reply Last reply Reply Quote 0
                                          • ulrikU
                                            ulrik @d.healey
                                            last edited by

                                            @d-healey said in Get "this" for current component in Global laf:

                                            @ulrik

                                            I can't get the local look and feel to work, I guess I'm doing something wrong...

                                            HiseSnippet 840.3ocsU01aSCCD1taFnEP.B9ADsOUjFUs7x.IDhs0thpXaTQAD7Ijqy0VScribbnTg3+E+r3e.bNocIk0gPUP9fUt64NmGe44N22ZDPRhwRnUey7XfPuFavbsaR6IbolzqCgda1XkYHWoLlobc3H.TjCmGySRfPBkt0K7ARqtMI64GO+PthqEPgKB4cFo.NVFIcEd6u+KkJUWdH7FYTone398DFcaixjhjZKVSRLWLkOFNk6CqBiPuzQgRmwNvwcPBgt8glv4ClXloyi+cxD4PE3MZQFfaTt6tFUnmwduj1Sjpv9KO7IDbW5WTJ1JuTbG1IxP4Y9KJI2LCHnHix0CZkUo2VqPuVkoWyRzaMThVhRamSoawFHrxXWAhmOWk0S6.6HNV1KSk7XIU9Nk01fQncMh3SgtVz3rLpuWyl6FfK28o0pgk9DWfhOJ3YAKSQXA7jbrQvUGiZfCzgcQMPce3XfMrvXYBtWcS0BmznquSnkOquINM9DPm1yAQ6ravnkni2MvL7S2s1WqUE+.IFEzH1J0t5NqmLdLbm+MLzaCYH5+aEj7ybaPetFTkn5Xv01DEaznQ8cxP2AyH6kFIf6bGB7.f3KIWfQepwAuRWOie09VsfeGZzn0h4If0nTfcsvdIt8OkXccZzPvtKdpTovYAh+2WULwtXwTYstHudTJPitmV5dULnunN.xhhH91a60g63dE3BeXbwf0I8Tf1A9L1NmqGqx5.IScl3rXWT4Izq3xPu9R0pu9Sjnl7xr72+RQCub+4EFeX+YxP2jxNl.xwSbk83mEMqMtNDmLfL5FrCTpfBGwk0dI9IXXsy0ple89YqO.m+btdKrq1Dlp3tUa08y2V.f+xVo+x2CoSjt4km+8Oq++ukh2h0W5DSVOGqrFNh+X+evwESMuN6nQi.gqffay599+OiHIu1j5j5wmvcVIpoXmlFM.u3P.3WWiBMeKCshWbma2za6q.C.cXlwOwmEfs71zEfsVBRh3Bq4ih7FU+b4qj4A4jN6JoprS71AsHYMuXdrlMZRhvqH9nP3O92C62VeN2eCx4AaPNObCx4QaPN6sA473MHmm7Gywe67AoNSTd6.5n+QYSznzizbTYkoBI+BPPUgGs
                                            

                                            This snippets Console.print returns nothing here, I'm on a develop build from April 3, what commit do you use?

                                            Hise Develop branch
                                            MacOs 15.3.1, Xcode 16.2
                                            http://musikboden.se

                                            d.healeyD 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            21

                                            Online

                                            1.7k

                                            Users

                                            11.8k

                                            Topics

                                            102.4k

                                            Posts