Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Mick is offline No longer a forum member
    Join Date
    Feb 2012
    Posts
    173

    Global or on startup

    Global or on startup, what comes first?

  2. #2
    Join Date
    Apr 2010
    Posts
    673
    Compliments of RizlaUK (to a similar question by me)
    Quote 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
    Cheers,
    MadDogDean

  3. #3
    Join Date
    Apr 2005
    Location
    Tabo„o da Serra
    Posts
    3,518
    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

  4. #4
    Mick is offline No longer a forum member
    Join Date
    Feb 2012
    Posts
    173
    ^^thanks

  5. #5
    Join Date
    Apr 2010
    Posts
    673
    Quote 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

  6. #6
    Join Date
    Oct 2007
    Location
    USA
    Posts
    29
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts