BBjHtmlView::getUrl

Description

In BBj 7.00 and higher, this method returns the URL associated with this BBjHtmlView.

Syntax

Return Value

Method

string

getUrl()

Parameters

None.

Return Value

Returns the name of current URL of the BBjHtmlView control.

Example

rem ' getUrl

url$ = "https://wikipedia.org"
client = 0
if (info(3,6)<>"5") then
    client = msgbox("BBjHtmlView Client",7+32+512,"BBjHtmlView","Swing","JavaFX","Chromium")
    switch client
        case 1; rem ' Swing
            print stbl("!OPTIONS","CHROMIUM_HTMLVIEW=FALSE",ERR=*NEXT)
            print stbl("!OPTIONS","JAVAFX_HTMLVIEW=FALSE",ERR=*NEXT)
            break
        case 2; rem ' JavaFX
            print stbl("!OPTIONS","CHROMIUM_HTMLVIEW=FALSE",ERR=*NEXT)
            print stbl("!OPTIONS","JAVAFX_HTMLVIEW=TRUE",ERR=*NEXT)
            break
        case 3; rem ' Chromium
            print stbl("!OPTIONS","CHROMIUM_HTMLVIEW=TRUE",ERR=*NEXT)
            print stbl("!OPTIONS","JAVAFX_HTMLVIEW=TRUE",ERR=*NEXT)
            break
    swend
endif
sysgui = unt
open (sysgui)"X0"
sysgui! = bbjapi().getSysGui()
window! = sysgui!.addWindow(50,50,1000,600,"BBjHtmlView::getUrl",$00090003$)
window!.setCallback(window!.ON_CLOSE,"eoj")
htmlview! = window!.addHtmlView(101,25,25,950,550,"",$$)
htmlview!.setCallback(htmlview!.ON_PAGE_LOADED,"loaded")
htmlview!.setUrl(url$)
process_events

eoj:
release

loaded:
    event! = sysgui!.getLastEvent()
    info$ = "Loading: " + htmlview!.getUrl() + $0a$ + "Current: " + event!.getUrl()
    i = msgbox(info$,0,event!.getEventName())
return

See Also

BBjAPI

BBjSysGui

BBjControl

BBjWindow

See the BBj Object Diagram for an illustration of the relationship between BBj Objects.