--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/commandfusion/-/QHGcKw0yUnIJ.
To post to this group, send email to comman...@googlegroups.com.
To unsubscribe from this group, send email to commandfusio...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/commandfusion?hl=en.
I know I can use the system clock, but since this clock is not sync'ed (or only during USB connection to a pc), I'd prefer to get the time and date from a timeserver.
When I read some forums, a lot of people are complaining 'bout this issue > so this means to me we can't trust the iPad/iPod internal clock...
Would that be possible from js?
Jarrod
--
You received this message because you are subscribed to the Google Groups "CommandFusion" group.
To view this discussion on the web visit https://groups.google.com/d/msg/commandfusion/-/qqvzKEr-ViIJ.
var someInt = 5;
var someTxt = "hello";
CF.request("http://www.mysite.com/gimme?somedata", function(status, headers, body) {
CF.log("request returned status: " + status);
CF.log("someInt="+someInt+", someTxt="+someTxt);
});
--
Florent Pillet - Software Engineering Lead
www.commandfusion.com
And no, you can't pass extra parameters for a generic callback function to receive.
If you want to do this for clarity and reusability, here is a trick you can play:
function textWebCallback(status, headers, body, extraNum, extraTxt) {
// ... do something here ...
}
function doSomeRequest(url, extraNum, extraTxt) {
CF.request(url, function(status, headers, body) {
textWebCallback(status, headers, body, extraNum, extraTxt);
});
}
Is it clear for you? You just use a mini lambda-function that will capture extraNum and
extraTxt and pass them along with the rest of the request results to you actual processing
function.
Florent
On Mar 15, 2012, at 7:16 PM, Jordan wrote:
> Florent, I assume that this isn't true if I enter a previously defined function as the callback (i.e. a resusable function). Is it possible to pass additional parameters after status, headers, body (using CF.request as example)?
--
Thanks a lot, Florent!