Announcement

Collapse
No announcement yet.

How do I version an efs file?

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

  • How do I version an efs file?

    I would like to use the checkVersion() method for making sure someone has the latest efs installed. I know how to call this function. But how do I actually version an efs or efslib file?

    I checked everywhere and couldn't find any info on this.

    Thanks!

  • #2
    I created an efs file such as in this example and added a versionNo var.

    var versionNo = 0.1;

    function preMain() {

    setPriceStudy(true);
    setStudyTitle("Example Script");
    setCursorLabelName("EMA", 0);
    setDefaultBarFgColor( Color.blue, 0 );
    setShowTitleParameters( false );

    // Assume that the name of this script is ExampleScript.efs
    // Each time this script is loaded, it will check the URL specified
    // in the checkVersion function. If the versionNo in the file found
    // at the URL is greater than the value of versionNo in the
    // running EFS, the user will be prompted to allow eSignal to
    // download the newer script. The download as well as the
    // replacement of the old EFS with the new is automatic.

    checkVersion( 0.1, "http://myWebSite.com/ExampleScript.efs" );
    }

    I placed this script in the Formulas directory.

    Then I changed the script at http://myWebSite.com/ExampleScript.efs, changing versionNo to say 1.0 and updated the first parameter in the checkVersion call to 1.0. I still didn't get a warning to update my efs script.

    Help!

    Comment


    • #3
      crazytiger
      You can find a working example of checkVersion() together with the instructions on how to use the EFS Auto Updates tool in this thread
      To answer your question you should be able to use any number sequence ie 1, 2, 3, etc or 1.1, 1.2, 2.0, etc.
      Note that if you are using checkVersion() in a function library file (ie *.efsLib) you must also add the name of the file as the third parameter eg
      checkVersion(1.0, "http://myWebSite.com/myLibrary.efsLib", "myLibrary.efsLib");
      Alex

      Comment


      • #4
        I didn't realize how to use it. It works great!

        Comment

        Working...
        X