revBrowserSet and the Browser Sampler
Posted: 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:
This is what I changed it to:
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
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
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
Is this a bug in RevBrowserSet or is there something I am not doing correctly.
Thanks,
Larry