Anyone A Guru With RevBrowser ?

Slava Paperno slava at lexiconbridge.com
Sun Jul 10 10:25:28 EDT 2011


Scott

> Issue number 1 is the loading of pages: is there anyway to freeze or lock
the
> RevBrowser display until downloading of new page content has completed?
> The site can be slow to respond, so my thought was to pop up a spinning
> progress indicator over a snapshot of the current page so the user knows
to
> wait.

You can set the browser's rect to be offscreen until the page is loaded and
display a "wait..." message or graphic in the rect where the browser will
eventually appear.

> Issue number 2 is "browserBeforeNavigate" which is seemingly unreliable.

It's quite reliable in my application. Something else may be the matter.

> The Web site has a logout link, and I am trying to detect clicks on this
using
> browserBeforeNavigate, so I can kill the browser and send the user to the
first
> card of the stack if they log out.  Apparently, RevBrowser detects the
link click
> (tested), but LiveCode stays on the same card and shuts down the browser
at
> random intervals, sometimes immediately, and other times only after many
> seconds (up to 60!).  I'm using this routine:

One thing I found was that it is important to close the browser as soon as
it is no longer needed. While it is visible, the revBrowser is very
responsive to changing its rect and to calls from my LC scripts to the JS in
the page. But if I forget to close it and other things start being displayed
in its space, that's asking for trouble. Your script, below, does that, so
you already know it. Maybe you need to make sure it's really happening. I
close my browser instances in the same kind of loop, and I haven't seen any
failures. Could there be something in progress in the Web pages that delays
the response?

Slava

> on browserBeforeNavigate pID,pURL
>    if "logout" is in pURL then
>       exitBrowser
>       wait 250 millisecs with messages
>       go cd 1
>       exit browserBeforeNavigate
>    end if
>    pass browserBeforeNavigate
> end browserBeforeNavigate
> 
> 
> command exitBrowser
>    put revBrowserInstances() into theList
>    repeat for each item theInstance in theList
>       revBrowserClose theInstance
>    end repeat
> end exitBrowser
> 
> I don't understand why this doesn't kill the browser immediately every
time.
> If I call exitBrowser from a LiveCode button, the script works as expected
> reliably.
> 
> Thanks for any help/insight.
> 
> Regards,
> 
> Scott Rossi
> Creative Director
> Tactile Media, UX Design
> 
> 
> 
> _______________________________________________
> 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





More information about the use-livecode mailing list