libURL: load unload bug?
Dave Cragg
dave.cragg at lacscentre.co.uk
Sat Feb 17 07:08:00 EST 2007
On 17 Feb 2007, at 11:12, David Bovill wrote:
> Thanks - I"ve added that check and so far so good.
>
> I think it would be good to add "libUrlResetAll" - it would have
> saved me
> from quiting and restarting a number of times?
If you do use libUrlResetAll, be careful. My general advice would be
to try not to use it, but if you do, use it at the end of a handler
or before a period of "idle time". If you have any url calls (get
url, etc.) after libUrlResetAll in the same handler, the results can
be unpredictable. I'm not completely clear of the reason for this.
libUrlResetAll clears a bunch of script local variables (using
"delete local"), and I suspect that the engine may not do this
deletion immediately. So subsequent url calls may start and then have
the script locals "pulled from under them" so to speak. I can't
confirm this, just a suspicion. :-)
So instead of this:
libUrlResetAll
repeat ...
load url whatever
end repeat
better to do this if possible:
libUrlResetAll
send "startLoading" to me in 50 milliseconds
on startLoading
repeat ...
load url whatever
end repeat
end startLoading
I'm guilty of not paying proper attention to libUrlResetAll. I've
always treated it as a "developer's tool", and not something to be
left in the patient after the operation. (I only use it when I'm
working on libUrl.)
Cheers
Dave
More information about the use-livecode
mailing list