Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Global or on startup

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Global or on startup

    Global or on startup, what comes first?

  • #2
    Compliments of RizlaUK (to a similar question by me)
    Originally posted by RizlaUK View Post
    Ello mate

    The sequence of events when starting an application are:

    Globals
    OnStartUp
    OnPreLoad
    OnShow

    And IMO, if its global, put it in globals, just to be sure :yes
    Cheers,
    MadDogDean

    Comment


    • #3
      The code placed in "Global Functions" is parsed first. It is a place to define functions that are called from other events/scripts and must be globally available, and should not be used to run any code at startup. This is what "On Startup" is for, where you can call the functions that were already defined.

      Ulrich

      Comment


      • #4
        ^^thanks

        Comment


        • #5
          Originally posted by Ulrich View Post
          The code placed in "Global Functions" is parsed first. It is a place to define functions that are called from other events/scripts and must be globally available, and should not be used to run any code at startup.
          Ulrich
          @Ulrich,
          I think I posted the question before, but where do plugins fall into the scope of things? I'm guessing they load between Globals and On Startup?

          Cheers,
          MadDogDean

          Comment


          • #6
            Plugins should load before On Startup and Global, because if your script make a call to a plugin before it has loaded an error will be returned. Script Interpreting Engine loads first, Plug-ins load next, Then Globals, Then On Startup, and so on, and so on.

            Comment

            Working...
            X