i'm new about the titanium, below is the code teach by my leader today but i got something confusion, anyone can explain and clarify what i explain, and explain more explain to me thx~ it work with HTTPClient and callback function with pass the parameter.
what is the purpose of call back?
app.js -------------- -var callFunction = require('gallery'); var function GetString(jsonString) { /* The jsonString will be return and pass something from the callback */ } callFunction.get(GetString);Another js file
gallery.js -------------- exports.get = getData; function getData(callback) { /* var str =JSON.parse(this.responseText); callback(str); */ }