Mastering TS Net

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Jul 2 11:19:11 EDT 2018


I looked at the lesson. Quite good!

I think one more lesson may be useful. 

In my case I will use a "slide show"  as a use case.

(But there others, thinking of streaming music playlist)

1) Assume you have the URLs for a slideshow; 
2) you fetch this by calling JSON/Text file with the urls for a slide show which exists on the server.
3) Let say you have 100 slides/URLs
4) Galleria (our web app jquery/html5) uses "lazyload 3" parameter, which asynchronously loads the next the 3 slides (besides the one you are viewing) in the background, then users view the next slide (already downloaded) -there is no delay.

So, with TSNetGet

How would set this up Livecode?

You don't want to "overwhelm" the phone with async calls to 100 connections/slide. (Galleria suggests "3")

But there is the advantage of taking the call back message,  get 3 at a time, store them in the documents folder, finally the user has the slides show on his phone, later he can view it off line. 

At the retrieval of the 100th slide, then we informed the user "Slideshow is download complete."

It the user "bails" on slide 36, when he comes back again. TSNetGet starts over but the only which slide 37.

That last part may not want to part of your lessons. Though it would be easy enough to check "these is a file" and if it is true, then TSGetNet, so "next repeat" without downloading.

I could work this out myself, but is such a common use case, everyone would benefit from it.

Brahmanathaswami
 

On 7/1/18, 3:40 PM, "use-livecode on behalf of Charles Warwick via use-livecode" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> wrote:

    If you can’t quite find an example lesson that answers what you need, let me know and I will get one organised.



More information about the use-livecode mailing list