OSX: revBrowser won't allow you to turn scrollbars back on
David Bovill
david at openpartnership.net
Wed Jul 30 12:56:07 EDT 2008
>From the docs:
> Cross Platform Caution: Due to a limitation in the current browser
> implementation, the behavior of the scrollbars property is slightly
> different on Windows and OS X. In particular, under OS X, when navigating to
> a page for the first time after disabling scrollbars, revBrowser won't allow
> you to turn scrollbars back on. The way to work around this and create a
> browser that allows scrollbars to be toggled on both platforms is like this:
>
> local sBrowserId
>
> on browserOpen
> put revBrowserOpen(the windowId of me, "http://www.runrev.com") into
> sBrowserId
> if the platform is "MacOS" then
> send "browserDisableScrollbars" to me in 1 second
> else
> revBrowserSet sBrowserId, "scrollbars", false
> end if
> end browserOpen
>
> on browserDisableScrollbars
> revBrowserSet sBrowserId, "scrollbars", false
> end browserDisableScrollbars
>
> on browserToggleScrollbars
> revBrowserSet sBrowserId, "scrollbars", (not(revBrowserGet(sBrowserId,
> "scrollbars")))
> end browserToggleScrollbars
I'm not quite sure what the issue here is with OSX, and am trying to create
a pair of getprop / set prop handlers that work on OSX:
getprop browser_ScrollBars
put the browser_ID of the target into browserID
if browserID is empty then
-- a default if the browser is not open
return empty
else
return revBrowserGet(browserID, "scrollbars")
end if
end browser_ScrollBars
setprop browser_ScrollBars someBoolean
put someBoolean is not false into someBoolean
put the browser_ID of the target into browserID
if browserID is empty then return "Error: no browser open for this
object"
if the platform is "MacOS" then
-- not sure what to do here to fix OSX issue?
-- send "browserDisableScrollbars" to me in 1 second
-- this does not work to trun them back on?
revBrowserSet browserID, "scrollbars", someBoolean
else
revBrowserSet browserID, "scrollbars", someBoolean
end if
return the result
end browser_ScrollBars
Is the issue one that I need to send a message on OSX rather than issue it
direct?
More information about the use-livecode
mailing list