revBrowserSet and the Browser Sampler

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

revBrowserSet and the Browser Sampler

Post by lohill » Thu Jun 05, 2014 11:37 pm

I wanted to be able to take advantage the recent developments in revBrowser that would allow me to use Chrome instead of IE. I have updated to LiveCode Community 6.7 (dp 4) and my existing application, which has been using a browser for a couple of years, immediately displayed problems placing the 'browser' in the rectangle which is supposed to contain it. I went back to the basics with the Browser Sampler stack and discovered that the same problem exists there both on my Mac and my PC.

At the simplest place I could find, I went to the card called "A Simple Browser" and made some changes in the altBrowserOn script that demonstrate that RevBrowserSet does not seem to be working correctly.

This is the original script:

Code: Select all

on altBrowserOn
   local tWindowId
   put the windowid of this stack into tWindowId
   
   local tBrowserId
   put revBrowserOpenCef(tWindowId, "http://www.google.com") into tBrowserId
   if tBrowserId is not an integer then
      answer "Error opening browser: " & tBrowserId
      exit altBrowserOn
   end if
   
   put tBrowserId into sBrowserId
   
   revBrowserSet sBrowserId, "showborder", true
   revBrowserSet sBrowserId, "rect", the rect of image "browserimage"
   
end altBrowserOn
This is what I changed it to:

Code: Select all

on altBrowserOn
   local tWindowId
   put the windowid of this stack into tWindowId
   
   local tBrowserId
   put revBrowserOpenCef(tWindowId, "http://www.google.com") into tBrowserId
   if tBrowserId is not an integer then
      answer "Error opening browser: " & tBrowserId
      exit altBrowserOn
   end if
   
   put tBrowserId into sBrowserId
   
   revBrowserSet sBrowserId, "showborder", true
   put the rect of image "browserimage" into tRect
   add 50 to item 1 of tRect
   add 50 to item 2 of tRect
   add 50 to item 3 of tRect
   add 50 to item 4 of tRect
   --revBrowserSet sBrowserId, "rect", the rect of image "browserimage"
   revBrowserSet sBrowserId, "rect", tRect
   
end altBrowserOn
The result shows the 'browser" nearer to the desired place but still not wat is desired.

Is this a bug in RevBrowserSet or is there something I am not doing correctly.

Thanks,
Larry

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: revBrowserSet and the Browser Sampler

Post by Klaus » Fri Jun 06, 2014 10:53 am

Hi Larry,

since you cannot do much wrong with -> revBrowserSet sBrowserId, "rect", tRect
and since this is a DP, I would consider this a bug.

Please report it here: http://quality.runrev.com


Best

Klaus

lohill
Posts: 770
Joined: Tue Dec 08, 2009 6:37 pm

Re: revBrowserSet and the Browser Sampler

Post by lohill » Fri Jun 06, 2014 5:24 pm

I have reported it Klaus. It is Bug 12602.

Larry

Post Reply