Global or on startup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Mick
    No longer a forum member
    • Feb 2012
    • 173

    Global or on startup

    Global or on startup, what comes first?
  • MadDogDean
    Indigo Rose Customer
    • Apr 2010
    • 672

    #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

    • Ulrich
      Indigo Rose Staff Member
      • Apr 2005
      • 5103

      #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

      • Mick
        No longer a forum member
        • Feb 2012
        • 173

        #4
        ^^thanks

        Comment

        • MadDogDean
          Indigo Rose Customer
          • Apr 2010
          • 672

          #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

          • thachsn1
            No longer a forum member
            • Oct 2007
            • 29

            #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