HISE Logo Forum
    • Categories
    • Register
    • Login

    Table.setContentCallback() -> undefined parameter 0

    Scheduled Pinned Locked Moved Solved Scripting
    11 Posts 3 Posters 175 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.
    • Oli UllmannO
      Oli Ullmann
      last edited by

      Hello to all! :-)

      I want to add a contentCallback function to my table. This is my code:

      pTable.setContentCallback(pointAdded());
      
      inline function pointAdded()
      {
      	Console.print("Point added, removed or changed.");
      }
      

      Unfortunately I get the following error message:

      API call with undefined parameter 0
      

      Does anyone know what I need to pass to the function or where the error is? I have already tried event and component as function variables. Neither solves the problem.

      Thank you very much
      Oli

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

        @Oli-Ullmann

        The reason for the error is probably because you're including () at the end of the assignment.

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

        Oli UllmannO clevername27C 2 Replies Last reply Reply Quote 2
        • Oli UllmannO
          Oli Ullmann @d.healey
          last edited by

          @d-healey
          Ah, yes! That was the problem! Thank you very much, David! 😊

          1 Reply Last reply Reply Quote 0
          • Oli UllmannO Oli Ullmann has marked this topic as solved on
          • clevername27C
            clevername27 @d.healey
            last edited by

            @d-healey @Oli-Ullmann I'm still unable to get this to work. Any ideas? 🤔

            0626c310-f4cc-458d-b88e-5733866ac4a9-image.png

            Oli UllmannO 1 Reply Last reply Reply Quote 0
            • Oli UllmannO
              Oli Ullmann @clevername27
              last edited by

              @clevername27
              Try this:

              dynamicsPlaygroundTable0bject.setContentCallback(DynPlayTableUI_Callback);
              

              Explanation:
              I assume that table_MODEL_DynPlayground_Table_GUI is just a table in the user interface. This component does not have the setContentCallback() function. Only the table of a processor has this function. That's why you have to use the processor table.

              clevername27C 1 Reply Last reply Reply Quote 0
              • clevername27C
                clevername27 @Oli Ullmann
                last edited by

                @Oli-Ullmann @d-healey Thanks for your suggestion, I did try that - I'm wondering if this is related to the table also being in a Scriptnode Network?

                3eca7c08-e00c-4c9d-b696-3fd9a3f9ec37-image.png

                Oli UllmannO d.healeyD 2 Replies Last reply Reply Quote 0
                • Oli UllmannO
                  Oli Ullmann @clevername27
                  last edited by

                  @clevername27
                  Unfortunately, I'm not really familiar with Scriptnote yet. :-( So I don't have any other ideas at the moment.

                  What happens if you write down dynamicsPlaygroundTable0bject. and then press escape? Which possible functions are displayed? Is there perhaps something there?

                  clevername27C 1 Reply Last reply Reply Quote 1
                  • clevername27C
                    clevername27 @Oli Ullmann
                    last edited by

                    @Oli-Ullmann Thank you for your reply. It comes up for both:

                    997f67c8-5788-421f-b45b-ba1455339525-image.png

                    86403717-b3cc-4826-bf82-a84a2a280e53-image.png

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

                      @clevername27 Perhaps this

                      086c616e-822f-4da4-9fbc-52a5894dca97-image.png

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

                      clevername27C 1 Reply Last reply Reply Quote 1
                      • clevername27C
                        clevername27 @d.healey
                        last edited by

                        @d-healey 😂😂😂 Thanks mate, that was it. (And thanks, @Oli-Ullmann.)

                        Oli UllmannO 1 Reply Last reply Reply Quote 1
                        • Oli UllmannO
                          Oli Ullmann @clevername27
                          last edited by

                          @clevername27
                          Glad you were able to solve it! :-)

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

                          6

                          Online

                          1.7k

                          Users

                          11.8k

                          Topics

                          102.3k

                          Posts