revBrowser displays nothing
Posted: Sat Jul 20, 2013 4:52 pm
Hi
I am having a very basic problem in that revBrowser does not display ANYTHING. I now reverted to RunRev supplied example code n(see below) and still nothing is displayed. I did build in some answer commands at every point and all the variables are OK - I tried LC 5.5 and 6.1 (both commercial licenses) and same problem. Any suggestions where I can look for something I need to change (in the setup even?)
Regards
Danny
local lBrowserID
on openCard
browserOn
end openCard
on browserOn
put the windowID of this stack into tWinID
put revBrowserOpen(tWinID, "http://google.com") into tBrowserID
if tBrowserID is not an integer then
answer "Failed to open browser." & tBrowserID
exit browserOn
end if
put tBrowserID into lBrowserID
answer ("Browser ID" & tBrowserID) with "Ok"
revBrowserSet lBrowserID, "showborder", true
revBrowserSet lBrowserID, "rect", the rect of graphic "browser"
end browserOn
on browserBeforeNavigate pID, pURL
global browserCancel
if "google.com" is not in pURL then
answer warning "Can't navigate to a domain ouside google.com."
put true into browserCancel
end if
end browserBeforeNavigate
on closeCard
browserOff
end closeCard
on browserOff
if lBrowserID is an integer then
revBrowserClose lBrowserID
end if
put empty into lBrowserID
end browserOff
I am having a very basic problem in that revBrowser does not display ANYTHING. I now reverted to RunRev supplied example code n(see below) and still nothing is displayed. I did build in some answer commands at every point and all the variables are OK - I tried LC 5.5 and 6.1 (both commercial licenses) and same problem. Any suggestions where I can look for something I need to change (in the setup even?)
Regards
Danny
local lBrowserID
on openCard
browserOn
end openCard
on browserOn
put the windowID of this stack into tWinID
put revBrowserOpen(tWinID, "http://google.com") into tBrowserID
if tBrowserID is not an integer then
answer "Failed to open browser." & tBrowserID
exit browserOn
end if
put tBrowserID into lBrowserID
answer ("Browser ID" & tBrowserID) with "Ok"
revBrowserSet lBrowserID, "showborder", true
revBrowserSet lBrowserID, "rect", the rect of graphic "browser"
end browserOn
on browserBeforeNavigate pID, pURL
global browserCancel
if "google.com" is not in pURL then
answer warning "Can't navigate to a domain ouside google.com."
put true into browserCancel
end if
end browserBeforeNavigate
on closeCard
browserOff
end closeCard
on browserOff
if lBrowserID is an integer then
revBrowserClose lBrowserID
end if
put empty into lBrowserID
end browserOff