Morning all
I’ve been looking over the documentation here, and struggling with something.
I’ve designed an application that guides a user through setting a process up on a website… I have a window, with two views: one of them the view that guides them, the other is a webView, and it’s all working.
I’m guiding them by looking at what the web page title it:
on webView_didReceiveTitle_forFrame_(theView, theTitle, theFrame)
-- we will use this to change, dynamically, the text in the menu bar when performing
tell viewWebKit's |window|() to setTitleWithRepresentedFilename_(theTitle)
set my URLTitleDetected to (theTitle as text)
if my URLTitleDetected contains "step 1" then
set my webKitMenuBarText to "You're at the start"
else if my URLTitleDetected contains "step 2" then
set my webKitMenuBarText to "You're at the end"
end if
end webView_didReceiveTitle_forFrame_
You can guess the rest…
Anyway, there’s one particular step of the process where the title doesn’t change. The current URL is useless also.
I’m guessing that this is the answer: https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/DisplayWebContent/Tasks/SaveAndLoad.html#//apple_ref/doc/uid/TP40001472-CJBEHAAG but not sure how to translate it into ASOC
Thanks in advance…