Hi, how do I set the title of a window and then load a website into the webview that’s inside it?
I’ve worked out how to load a website in a webview…
property webview : missing value
on showWebsite(sender)
webview's setMainFrameURL_("http://www.google.com")
end showWebsite_
But I still don’t know how to set the title of a window through code.
What about -[NSWindow setTitle:]:
Thanks for that! It works! =)
Any ideas on how to get the title of the current webpage in the webview and set the window title to that?
After setting the frame load delegate using -[WebView setFrameLoadDelegate:] you can receive the title with the delegate’s method: webView:didReceiveTitle:forFrame:.
Ok!
Sorry, I haven’t replied in a while!
I tried out just testing setTitle with a string… is this right?
my mainWindow's setTitle_("TITLE CHANGED!")
But that doesn’t work…
EDIT: It works!! =D Thanks a lot!