How to Destroy a revBrowser object

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

How to Destroy a revBrowser object

Post by montymay » Wed Feb 18, 2015 2:09 am

I have a field scripted to open an instance of a revBrowser object and display web-based PDFs. I need a card or stack script to close the revBrowser object upon closing the card or stack or clicking another item in a locked list field on the same card. I have successfully closed the object with the following script for a button on the same card as the opened revBrowser.

Code: Select all

global gBrowserID
on mouseUp
     revBrowserClose gBrowserID
end mouseUp
But when I use the same script (substituting closeCard or closeStack handlers respectively, for the mouseUp handler) for the card or stack and navigate to another stack and then return, the revBrowser object is still open and I don't understand why or know how to close it with a card or stack script. In the Dictionary entry for revBrowserOpen I see the following statement: "It is currently possible to cancel browser operations by setting the browserCancel global variable to true." Is cancelling "browser operations" the same thing as closing the revBrowser object, or does it have the same result? If so, how do I use this global variable? I don't know what I am overlooking. Thanks for any suggestions or pointers.

Monty

LCNeil
Livecode Staff Member
Livecode Staff Member
Posts: 1223
Joined: Wed Oct 03, 2012 4:07 pm

Re: How to Destroy a revBrowser object

Post by LCNeil » Wed Feb 18, 2015 10:37 am

Hi Monty,

This is unfortunately a bug that we are currently investigating. More information on it can be found here-

http://quality.runrev.com/show_bug.cgi?id=13831

Kind Regards,

Neil Roger
--
LiveCode Support Team ~ http://www.livecode.com
-

montymay
Posts: 145
Joined: Thu Jul 18, 2013 5:23 am

Re: How to Destroy a revBrowser object

Post by montymay » Tue Feb 24, 2015 12:59 am

Hi Neil,

Thanks for the information. I neglected to mention that I was editing and running my app in LC 6.6.2. Has the bug been fixed in LC 7? When I have used LC 7 before, I found that the "launch document" command would not open local PDFs (another bug?), but since the PDFs are also web-based, I will open the web-based PDFs in the revBrowser object if the bug has been fixed in LC 7.

Regards,

Monty

Post Reply