libURL gone mad
Richard Gaskin
ambassador at fourthworld.com
Thu Sep 1 19:47:23 EDT 2016
Follow-up: how much in the way of libURL reliability will find its way
into v8.1 Community Edition?
I have some ambitious goals for the open source version down the road,
and I'm hoping we can have robust, reliable HTTP access there as well.
--
Richard Gaskin
Fourth World Systems
Charles Warwick wrote:
> Hi Richard,
>
> I am keen to see as many of these issues resolved as possible, so please
> let me know if you have any more details for requests that don't seem to
> ever complete or error.
>
> By the sounds of it, you are using a commercial version of LC that
> includes tsNet and its libUrl wrapper.
>
> There are a number of fixes for tsNet that will be coming out in 8.1RC2
> when it is released (they did not quite make it into RC1).
>
> In particular, the "tsneterr: Sync request already in progress" should
> only be seen if you are calling the tsNet handlers directly, not if you
> are using libUrl. In RC2, you will only ever see the standard "Previous
> request not yet completed" error if you are using libUrl commands.
>
> It also has some improved request handling that will hopefully resolve
> some of issues with requests not completing properly.
>
> And in answer to your main question there.... this release will also
> include a new function tsNetIsSyncBlocked() that will do exactly what
> you want.
>
> This function will return true if an existing synchronous network
> request is in progress (libUrl commands like post x to url y, put url x
> into y, etc...) that will prevent another synchronous request from being
> initiated (async or non-blocking requests can still be made). Note that
> in the LC Business edition, multiple requests can be sent at the same
> time, so this will always return false.
>
> So, to rewrite the handler you have below, you will be able to simply do:
>
> on mouseUp
> if tsNetIsSyncBlocked() is true then
> beep
> else
> get url tURL
> if the result is empty then
> put it into image 1
> else
> answer the result
> end if
> end if
> end mouseUp
More information about the use-livecode
mailing list