[BUG] Browser widget implemented without access to localStorage API

Andre Garzia andre at andregarzia.com
Wed May 16 18:03:21 EDT 2018


Panos,

Found a race condition that causes the behavior I mentioned originally. It
is quite easy to reproduce, just try to execute any "liveCode.*" as soon as
the page loads. Apparently it takes some time (ticks? millisecs?) for the
liveCode.* namespace to be available for scripts running on the webview, if
you try to run them too soon, you get an undefined function error.

I had to wrap my initialization code into a "setTimeout()" so that it runs
500 milliseconds after the page load.

If you pick that stack you attached to the other bug and instead of binding
the "iMouse1" and "iMouse2" functions to event handlers, you instead simply
try running:

  liveCode.iMouse2()

In the beginning of the script, you will see the error pop in "adb logcat |
grep -i console" like:

05-16 18:48:03.872 12462 12462 I chromium: [INFO:CONSOLE(43)] "Uncaught
TypeError: liveCode.getWordDefinition is not a function", source:
file:///android_asset/modules/lexicon/web/index.js (43)

Thanks for all the help.
PS: update the bug with a comment like this one.


On Wed, May 16, 2018 at 1:50 PM, Ralph DiMola via use-livecode <
use-livecode at lists.runrev.com> wrote:

> Agreed but I have had registry problems in the past doing that so I avoid
> it. Livecode may not be a problem in that regard.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> rdimola at evergreeninfo.net
>
>
> -----Original Message-----
> From: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] On
> Behalf
> Of Trevor DeVore via use-livecode
> Sent: Wednesday, May 16, 2018 12:26 PM
> To: How to use LiveCode
> Cc: Trevor DeVore
> Subject: Re: [BUG] Browser widget implemented without access to
> localStorage
> API
>
> On Wed, May 16, 2018 at 11:02 AM, Ralph DiMola via use-livecode <
> use-livecode at lists.runrev.com> wrote:
>
> > It's not that easy on Windows.
> >
>
> Why not? I just duplicated the LiveCode Business.exe on Windows 10 and was
> able to launch two separate instances of LiveCode.
>
> --
> Trevor DeVore
> ScreenSteps
> www.screensteps.com
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



-- 
http://www.andregarzia.com -- All We Do Is Code.
http://fon.nu -- minimalist url shortening service.



More information about the Use-livecode mailing list