• Gordon

    Thanks. Files attached. Please remember this is my first serious piece of JS - feedback appreciated :)

    My current test code for using it looks like this:

    var Date=require("http://192.168.0.12/date.j­s").constructor;
    var Clock2=require("http://192.168.0.12/cloc­k.js").constructor;
    
    print("hello");
    print(Clock2);
    
    var clk=new Clock2(2014,15,4,23,57,0,0);
    
    function showClock() {
      
        print(clk.getClockTime().toString());
    }
    
    setInterval(showClock,1000);
    

    The result on running:

    Date Module - Loading...
    Before date fn
    After date fn
    getDayssinceepoch
    setDayssinceepoch
    Done Loading Clock Module
    Date Module - Loaded.
    Clock Module - Loading
    xLoading Date
    xDone loading Date
    ERROR: Using '.' operator on non-object at line 66 col 29
    print("Clock module - Loaded.");

                             ^
    

    ERROR: Got String:');
    ' expected ID at line 66 col 31
    print("Clock module - Loaded.");

                               ^
    

    hello
    undefined
    ERROR: Constructor should be a function at line 1 col 161
    var Date=require("http://192.168.0.12/date.js").constructo­r,Clock2=require("http://192.168.0.12/cl­ock.js").constructor;print("hello");prin­t(Clock2);var clk=new Clock2(2014,15,4,23,57,0,0);function showClock(){print(clk.getClockTime().toS­tring())}setInterval(showClock,1E3);

                                                                                                                                                                 ^
    

    Throttle sending is ON. Minify is set to 'simple optimisations'

    Martin


    2 Attachments

About

Avatar for mgg1010 @mgg1010 started