HISE Logo Forum
    • Categories
    • Register
    • Login

    Custom look and feel component ID

    Scheduled Pinned Locked Moved Scripting
    laflook and feel
    43 Posts 6 Posters 2.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.
    • NatanN
      Natan @Fortune
      last edited by

      @Fortune You Don't Get It :) i Was Waiting For This Fix, And With Dave's Investigation, It Fixed Now :)
      You Don't Get It, Man :) I Was Prepared For Sleeping, And Now I'm Building The Latest Version :)
      Yeah, I Gifted Already :)

      FortuneF 1 Reply Last reply Reply Quote 0
      • FortuneF
        Fortune @Natan
        last edited by Fortune

        @Natan Ok after building, good night then :)
        But again, I think actually YOU don't get it :D :D you are not the only person who wait for fixes or features ;)

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

          I‘d say Nathan got the timeouts before it was cool...

          NatanN 1 Reply Last reply Reply Quote 3
          • NatanN
            Natan @Christoph Hart
            last edited by

            @Christoph-Hart It was A Nightmare Christoph
            I Tried To Explain This In Another Thread, But No One Get It At That Time 😢 I Felt Like E.T 😩
            Thank You Legend 👏

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

              The text property of obj when applying LAF to combo boxes holds the text of the combo box's value, rather than the text property. This means we have no way to distinguish between different combo boxes (unless we get clever/hacky with some of the other properties). Could we get the text property of the combo box added to its obj?

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

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

                @d-healey shouldn’t be hard to fix, I’ll have a look sometime today...

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

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

                  @d-healey I just got an idea. What do you think of having a misc property for all the components, that is not linked to anything? So it would be just something we can get for any purpose we’d like, thinking of LAF customisation at the top of the list of course.
                  So just a complementary text property... sounds cool enough?

                  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 I think we should get @Christoph-Hart opinion

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

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

                      I think it might be better to actually include the ID of the component as obj.ID - this way you can either use a lookup table or clever name mangling to figure out what path to take in the LAF function.

                      Adding a new property seems a bit verbose to me as it pops up on every component's property editor.

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

                        @Christoph-Hart I totally agree, but how can the ID be gathered? I tried to add it back in time but then you told me we cannot (easily?) reach the ID from a custom LAF... So I imagine it is not my level of knowledge to implement it, unfortunately 🙃
                        I tried obj->setProperty("id", s.getComponentID());with no luck

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

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

                          It would have to go through the JUCE::Component::setName() property - the scripting engine passes the ID as name to the component and the LaF fetches it with Component::getName() and then writes it to the obj parameter.

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

                            @Christoph-Hart Alright I'll give it a go...
                            One question though, you said once that accessing variables outside from the LAF is bad. So what about accessing a lookup table like you mentioned right above? assuming the lookup table is declared outside of course. Or should we declare it inside?

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

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

                              @ustk said in Custom look and feel component ID:

                              @Christoph-Hart Alright I'll give it a go...
                              One question though, you said once that accessing variables outside from the LAF is bad. So what about accessing a lookup table like you mentioned right above? assuming the lookup table is declared outside of course. Or should we declare it inside?

                              I've been accessing variables (consts) outside of the LAF functions without issue. I think it might be that Christoph meant you can't pass in additional parameters to the LAF functions... ?

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

                              Christoph HartC 1 Reply Last reply Reply Quote 0
                              • Christoph HartC
                                Christoph Hart @d.healey
                                last edited by

                                @d-healey have you tried multiple instances?

                                1. create a plugin instance with a laf that refers to an outside variable
                                2. create a second instance
                                3. leave both windows open and delete the first instance

                                This scenario was the most vurnerable setup I could find when debugging laf crashes.

                                d.healeyD 2 Replies Last reply Reply Quote 0
                                • ustkU
                                  ustk @Christoph Hart
                                  last edited by

                                  @Christoph-Hart said in Custom look and feel component ID:

                                  It would have to go through the JUCE::Component::setName() property - the scripting engine passes the ID as name to the component and the LaF fetches it with Component::getName() and then writes it to the obj parameter.

                                  Oh, is this why text is automatically set from the ID when creating the component? getName() already returns the text property, this does not give the ID. Or is there something I don't understand? (what a question Greg... of course you don't...)

                                  obj->setProperty("id", "Please fill in the form :)");
                                  obj->setProperty("text", s.getName());
                                  

                                  @d-healey Yeah

                                  I've been accessing variables (consts) outside of the LAF functions without issue.

                                  Me too, but this goes back to when I had some crash issues to track down, the access to outside variable was a lead from Christoph. So even if it apparently works likes this, I'm afraid of instability we could prevent... You know, when Christoph says "be careful with this", I quickly get shaking legs 😰 😆

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

                                  1 Reply Last reply Reply Quote 1
                                  • d.healeyD
                                    d.healey @Christoph Hart
                                    last edited by

                                    @Christoph-Hart said in Custom look and feel component ID:

                                    @d-healey have you tried multiple instances?

                                    1. create a plugin instance with a laf that refers to an outside variable
                                    2. create a second instance
                                    3. leave both windows open and delete the first instance

                                    This scenario was the most vurnerable setup I could find when debugging laf crashes.

                                    I hadn't tried in an exported plugin, just in HISE. I shall adjust my script accordingly!

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

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

                                      @Christoph-Hart I just made a little test with external variables, following your steps. I found no issues. I was testing an SVG path in an external variable, I tried in Ardour and Qtractor, both seemed stable after I deleted the first instance.

                                      HiseSnippet 1770.3ocsXs2ZbaDDWmiUI9ZuRBzO.h7WmgqFsqV8JgPb7qfo4gINMTZoDj0s2cpVmzgNcN0Dx2s9QpeCZmYeHsx2ESvPBXxs6ryL+lW6NiNqpLkubYYkUucd20K3V89A6yutnd1gyRxJrN8HXe67jI07k0VGb8hjkK4is506du.I2amssD+6ee1AI4IEo71srrdeYVJ+kYyypa28r8+kr77SRFyeW1biSy1+zzxhCKyKWAP4d1tVKRRuLYJ+0I3w1x1p22c73r5xpyqS.vX0a6CJGe84yJ+Xg77uOaY1E4bbAw5bPPxsOoLeLhXbWqCmkkO9LsIuzBjxYsNf6Ic.+j8qxFm0reqi3ABBNsbX5O5s0sAOhI7b+5gWOC3ssDdOz97zprE0sTPr881mVTyqlj.g.SXIOq0VOXf8gkvIJp2adxk7SpfEMbLLv0cjiuq6tOYP+A8q3ScVd0ziRpSDqU+14oN+Ag3Nh3FOxmLhDFOhx7FEDNh3yFQI3+GJV5FA+QE+QoTbKpq+HBC3k4iKiifcXhcnTFtCHPTXDOO4w6PTHeP.j.o36HZhq2Hpm6nXpV2cAGp5PfwHkhQV8.8yDBCfDEn3K+c.nGVnBOnL7i0KH9iFzWwjRj9LCQhPfBPFONUvKIxfWpGQpBzn.gF.FkGZTTRr1JDFVnORLVXEnSgDpDIJH3WlbxLII3Sa5DhFmBWYnqfOi3BI1sEOtspDwJIhnPNtQj.sC5q7ajPhYPPoWTNj.2NJkEqUpA0lfma.50i6RDLLweADjnHoANtejNmPHWRflXH5K7M4LNTI0l7ofN7FEIhwJdcij7RktTWBRTGIB8zBFrcSQqS3BB2.rHxrn0MFCBccAhnRCQg2vWGPvifBm0Mbph0TYBhtBQnLYzRRxqMJphwcx.BCahbXLUnvVPKyzfyIi7Jc1vruNcqMsrwSvTYoJH0jQSQGGb.rTLnSofqqzivnnGoS8C5LznR3sj.no1iBmlB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wZ8obgYsKGuJOot6.33WcPQ.BxclzEmlsXYV80leUhuISk+0B2GZeVVc5rMi2s1.dgv52Z7p9FGCrOdxDdZcKX219je6a+Gzv5skqpyJl9pj5pLHMy90qleNjzjxAjTTvywBwdagkLx0t3ZzybNuXrXw+A+SQjfq6oHRzDslmjVU9gTYgF9UTtuXG.SEhOlzN1uBW6zTeYa6tmq07rwYeHMEcE+Lf8MyC8Nvi2cfG1cfG+6.OA2AdBuC7Dcq7feWsmuptbtrLA13riE2y0q2wEIPVlHiz5+AlYtqq
                                      

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

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

                                        Alright, it might be possible that I've fixed this already lol...

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

                                        29

                                        Online

                                        1.7k

                                        Users

                                        11.8k

                                        Topics

                                        102.7k

                                        Posts