Skip navigation.
 
mlRe: Updating webview with HTML attribute of a managed object
FROM : Jim Correia
DATE : Tue Jul 18 18:46:56 2006

On Jul 18, 2006, at 12:21 PM, Tom Burns wrote:

> Option #2 seems like the better way to go, and was my original plan,
> but perhaps I wasn't clear enough: I am not sure how to go about
> "getting" the managed object associated with the selected row in the
> tableview. the best I could think of was using a fetch request and
> matching the contents of one of the columns in the table with the
> contents of the associated attribute, but there must be a cleaner way
> than that, right?


In no case is using a fetch request going to be the right answer for 
getting the managed object from a selected row in a table view.

At this point you have a controller/bindings problem - CoreData is no 
longer relevant.

It sounds like what you are building is a Master-Detail interface.

<http://developer.apple.com/documentation/Cocoa/Conceptual/
CocoaBindings/Tasks/masterdetail.html
>

If you haven't, build one of these with Cocoa controls that have 
bindings for the things you wish to do, so you can understand how it 
works.

Then you can tackle the problem of getting the HTML string into the 
WebView, which doesn't have a binding for that. (You'll have to react 
to selection changes in the table view, and get the the selected 
objects from the controller to which the table view is bound.)

Jim

Related mailsAuthorDate
mlUpdating webview with HTML attribute of a managed object Tom Burns Jul 18, 18:09
mlRe: Updating webview with HTML attribute of a managed object Jim Correia Jul 18, 18:14
mlRe: Re: Updating webview with HTML attribute of a managed object Tom Burns Jul 18, 18:21
mlRe: Updating webview with HTML attribute of a managed object Jim Correia Jul 18, 18:46
mlRe: Updating webview with HTML attribute of a managed object Andreas Mayer Jul 18, 18:50
mlRe: Re: Updating webview with HTML attribute of a managed object Tom Burns Jul 18, 18:58