HISE Logo Forum
    • Categories
    • Register
    • Login

    Namespace in included file is not available

    Scheduled Pinned Locked Moved Scripting
    7 Posts 2 Posters 200 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.
    • SimonS
      Simon
      last edited by

      I have some constants declared in a namespace, which are in a file that gets included at the top of my script.

      For some reason these constants are not available in one particular function.

      If I declare these constants in the exact same place, but without the namespace, they are available and it works fine.

      I'll investigate more later!

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

        @Simon Could you give a script example?

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

        SimonS 1 Reply Last reply Reply Quote 0
        • SimonS
          Simon @d.healey
          last edited by

          @d-healey Of course, later, was just putting it here so I remember to come back and investigate :)

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

            @Simon Sure, does everything else in that namespace work as expected?

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

            SimonS 1 Reply Last reply Reply Quote 0
            • SimonS
              Simon @d.healey
              last edited by

              @d-healey The constants were the only thing in the namespace, vowel.aa, vowel.ee, vowel.uu, etc.

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

                @Simon were you including the namespace within another namespace?

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

                SimonS 1 Reply Last reply Reply Quote 0
                • SimonS
                  Simon @d.healey
                  last edited by

                  @d-healey Nope, it's the only namespace in the project and it was just to have some nice prefixes on the constants. It feels like something with variable hoisting but I'll check properly later.

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

                  59

                  Online

                  1.7k

                  Users

                  11.7k

                  Topics

                  102.3k

                  Posts