HISE Logo Forum
    • Categories
    • Register
    • Login

    namespaces and timers

    Scheduled Pinned Locked Moved General Questions
    6 Posts 3 Posters 334 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 Lindon

      Can I not have a timer inside a namespace?

      This:

      namespace mySpace
      {
           reg myTimer = Engine.createTimerObject();
      }
      

      gives me this "generic" error:

      mySpace.js (3): mySpace.myTimer: error at definition

      HISE Development for hire.
      www.channelrobot.com

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

        @lindon

        Declare it as a const.

        Works as a reg here though, but const is the correct type for timers.

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

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

          @d-healey -= wow yep, strange because I DON'T need to do that outside a namespace...

          thanks - moving on...

          HISE Development for hire.
          www.channelrobot.com

          d.healeyD ustkU 2 Replies Last reply Reply Quote 1
          • d.healeyD
            d.healey @Lindon
            last edited by

            @lindon said in namespaces and timers:

            I DONT need to do that outside a namespace

            I can't see a reason to use reg or var for a timer, inside or outside a namespace.

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

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

              @lindon you can declare a const inside a namespace

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

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

                @ustk said in namespaces and timers:

                @lindon you can declare a const inside a namespace

                -- er , yes....clearly, but thats not actually the issue here...well never mind moving on...

                HISE Development for hire.
                www.channelrobot.com

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

                23

                Online

                1.7k

                Users

                11.9k

                Topics

                103.7k

                Posts