I have a basic Core Data application for an array of Jobs displayed in an NSTableView. I want to add a WebView that will load the string inside the job.htmlSummary attribute for the selected item in the table view (job is my entity). If I use an NSTextField, I can simply use "Bind To: Jobs" for Value in the bindings inspector with Model key path set to htmlSummary.
However, I have no idea how to do this for the WebView. I know the code would be something like
But I do not know how to call this every time the selection changes. Or how that binding works.
P.S. I am using Hillegass's chapter on creating a Core Data document application as the inspiration. CarLot is the example.
However, I have no idea how to do this for the WebView. I know the code would be something like
Code:
[[webView mainFrame] loadHTMLString:selectedItem.htmlSummary baseURL:myUrl];
P.S. I am using Hillegass's chapter on creating a Core Data document application as the inspiration. CarLot is the example.