Your Universal Remote Control Center
RemoteCentral.com
Philips Pronto Professional Forum - View Post
Up level
Up level
The following page was printed from RemoteCentral.com:

Login:
Pass:
 
 

Original thread:
Post 1 made on Saturday March 10, 2018 at 07:34
sebastian
Long Time Member
Joined:
Posts:
September 2003
63
Hi,

I was playing around with the getHTTP() static method from com.philips.HttpLibrary.
The method allows to specify a callback function that is applied to the data returned by the HTTP request.

I'm looking for a way to pass through the return value of the callback function so it becomes the return value if the getHTTP() call.

I imagine something like:

button.label = getHTTP("theURL", function(data) { return data.match("/\d{1,2}/"); });

Of course, I could use a variable to store the result of data.match(), but that seems so inefficient.
Is there really no other way?

Sebastian


Hosting Services by ipHouse