HISE Logo Forum
    • Categories
    • Register
    • Login

    include files

    Scheduled Pinned Locked Moved Scripting
    3 Posts 2 Posters 379 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.
    • ustkU
      ustk
      last edited by

      Hi
      Is it possible to include an external file that contains both onInit and onTimer functions?

      Generally, in my main code (onInit), I try to keep it short and throw every part in external files...
      If I want two separated parts, do I have to use two separated .js? like one in the onInit and the other in the onTimer?

      It is certainly basics but I can't catch it...
      Thanks

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

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

        Kind of. In your external file create a function called onInitCB and then call that function in your main onInit callback once you've included the file. Do the same for the onTimer callback.

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

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

          Thanks, David! I'm on it...

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

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

          29

          Online

          1.8k

          Users

          12.0k

          Topics

          104.7k

          Posts