Skip navigation.
 
mlRe: Updating webview with HTML attribute of a managed object
FROM : Andreas Mayer
DATE : Tue Jul 18 18:50:59 2006

Am 18.07.2006 um 18:21 Uhr schrieb Tom Burns:

> I am not sure how to go about
> "getting" the managed object associated with the selected row in the
> tableview.


You ask the associated array controller for it's current selection:

id firstSelectedObject = [[myArrayController selectedObjects] 
objectAtIndex:0];


Also, you'll probably want to add an observer, to be notified when 
the selection changes:

[myArrayController addObserver:self forKeyPath:@"selection" 
options:NSKeyValueObservingOptionNew context:NULL];


And don't forget to remove the observer, before you destroy it.


Andreas

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