Here is the code:
adjust_geo = function(callback){Plasma.Hose('edge-to-sluice').Deposit({ "descrips": [ "sluice", "prot-spec v1.0", "request", "zoom" ], "ingests": { "lat": stickie.latitude, "lon": stickie.longitude, "level": stickie.zoom_level } }); Plasma.Hose('edge-to-sluice').Deposit({ "descrips": [ "sluice", "prot-spec v1.0", "request", "set-time" ], "ingests": { "time": stickie.start, "rate": 2.0, "pause": false } }); callback(); } var remove_stickies = function(callback){ Plasma.Hose('edge-to-sluice').Deposit({ descrips: ['sluice', 'prot-spec v1.0', 'request', 'remove-all-fluoro'], ingests : {} }); callback(); } deposit_fluoros = function(){ console.log(stickie.fluoroscopes); L = JSON.parse(stickie.fluoroscopes); console.log(L); for (var i = 1; i<L.length;i++){ console.log(L[i]); Plasma.Hose('tcp://localhost/edge-to-sluice') .Deposit({ "descrips": [ "sluice", "prot-spec v1.0", "request", "new-fluoro-instance"], "ingests":L[i] }); }; } } adjust_geo(remove_stickies(deposit_fluoros())); as you can see on the last line, I am attempting to execute the three asnychronous functions in order. However right now it is complaining that callback() on line 34 is undefined. TypeError: undefined is not a function. Its strange because it doesn't seem to care about the one in adjust_geo?
adjust_geo,remove_stickiesanddeposit_fluoros?