Forum

    • Register
    • Login
    • Search
    • Categories

    namespaces and timers

    General Questions
    3
    6
    36
    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.
    • Lindon
      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.healey 1 Reply Last reply Reply Quote 0
      • d.healey
        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

        Lindon 1 Reply Last reply Reply Quote 1
        • Lindon
          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.healey ustk 2 Replies Last reply Reply Quote 1
          • d.healey
            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
            • ustk
              ustk @Lindon last edited by

              @lindon you can declare a const inside a namespace

              Tired to press F5 in the forum...
              Studio427 Audio - Audio Instruments & FX Plugins for music production. Website - Facebook

              Lindon 1 Reply Last reply Reply Quote 0
              • Lindon
                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

                14
                Online

                741
                Users

                5.4k
                Topics

                50.4k
                Posts