Hey folks, I have a question, would it be at all possible to have the Internet Library merged as part of the regular engine code? Or at least the Load URL and Unload URL code as given that Put URL already exists in the engine and is the blocking kind, I think having the unblocking kind be included and available from the get go would be a nice little addition to the engine. Additionally I think such a change would allow most LC devs to be able to uncheck the Internet Library from the standalone settings box, which for a neat freak like me is like the difference between hot and cold. Haha.
Additionally any thoughts from both users and devs on this idea are welcome, its good to promote discussion.
Internet Library Suggestion
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, LCMark
-
- VIP Livecode Opensource Backer
- Posts: 239
- Joined: Tue Jun 30, 2009 11:15 pm
Re: Internet Library Suggestion
I think URL for files is handled by the engine. The last I saw, PUT was not, but that might be new.
I'm all for nonblocking.
The blocking form allows for interesting lines like this:
put processed( URL "http://alpha.com/test" ) into URL "http://beta.com/test"
The nonblocking form, if implemented, might be informed by how the sockets/driver/process model works:
URL GET "http://alpha.com/test" with callback "processAlpha"
I have helped create a 'wait with messages' kind of nonblocking for a dialect of libURL, but that forces completion in the reverse order of requests. I like the callback approach better.
Of coarse, load provides a step in that direction.
I'm all for nonblocking.
The blocking form allows for interesting lines like this:
put processed( URL "http://alpha.com/test" ) into URL "http://beta.com/test"
The nonblocking form, if implemented, might be informed by how the sockets/driver/process model works:
URL GET "http://alpha.com/test" with callback "processAlpha"
I have helped create a 'wait with messages' kind of nonblocking for a dialect of libURL, but that forces completion in the reverse order of requests. I like the callback approach better.
Of coarse, load provides a step in that direction.
Re: Internet Library Suggestion
Whether internet support is in the engine or not depends on the target platform. On mobile / server, the 'url' functions are in the engine (Android uses the Java classes, iOS uses the NSURLConnection classes, Server uses curl). On desktop, the engine sends messages through the message path to handle the internet functions - these are then handled by libURL.
On Desktop:
On Desktop:
- 'put ... into url ...' - sends putUrl
- 'delete url ...' - sends deleteUrl
- 'load url ...' - sends loadUrl
- 'post ... to url ...' - sends postUrl
- 'url ...' (as in an expression) - sends getUrl
-
- VIP Livecode Opensource Backer
- Posts: 239
- Joined: Tue Jun 30, 2009 11:15 pm
Re: Internet Library Suggestion
So would it be possible to have LibURL exist in a stack's script inside the Message Path and still be able to call Load URL? If so that would be fantastic, don't ask me why I would like this, I'm weird and I would only baffle you trying to explain.
Re: Internet Library Suggestion
@mitchpitkin92: If I understand what you are asking correctly - then yes. The libUrl script is in button revLibUrl of stack revLibrary - you can copy this button into a stack and then use 'insert button "revLibUrl" of ... into back" to allow it to be used. The standalone builder does this automatically when building a standalone if you choose to include the 'internet library'.