Hi everyone,
I'm quite new to OS X development. In my first "serious" app, I need to make NSToolbar items change their state according to changes in other components of the UI. The application architecture is the same as the document-based cocoa application template provided by Xcode, with the following modifications:
Window Controller scene: I've added the toolbar as part of the window and set it up to use a custom controller which inherits from NSWindowController.
View Controller Scene: I've replaced the included components with a WebView and set it up to use a custom controller that inherits from NSViewController.
What I want to get is that, for instance, when the webview loads a new page, the value in a text field included in the toolbar should reflect this change. At the same time, when the user enters a new value in that field, the webview should load the new page. Yes, I am working on a browser! 😉
Anyways, I know the WebView delegate methods I should implement, but the problem is that:
- Interface Builder does not allow me to connect the "Sent action" from the text field to some code within my WebViewController;
- I do not know how to access the text field from within the WebView controller, since Interface Builder does not allow me to create an outlet.
Could you help me with that? I am struggling and I do not know how to proceed...
Thanks in advance for your support!