Re: Figuring out which values are selected in an NSTableView
Re: Figuring out which values are selected in an NSTableView
- Subject: Re: Figuring out which values are selected in an NSTableView
- From: mmalcolm crawford <email@hidden>
- Date: Tue, 17 May 2005 21:06:05 -0700
On May 17, 2005, at 8:38 PM, Denis Stanton wrote:
I realise this may seem obvious with experience, but unfortunately
it's not clear to me yet. I don't know how to get information on
the current selection via the bindings mechanism.
I'm not sure in what sense you need to "get information on the
current selection via the bindings mechanism" -- selectedObjects is a
straightforward method of NSArrayController, so send a message to the
instance...
I can see that selectedObjects can be sent to an instance of
NSArrayController but in my app the lines:
- (void)observeValueForKeyPath: (NSString *)keyPath ofObject: (id)
object change: (NSDictionary *)change context: (void *)context {
NSLog(@" selectedObjects = %@", [paymentController
selectedObjects]);
}
always return
selectedObjects = (null)
Is the paymentController outlet actually connected? If there is no
selection, 'selectedObjects' returns an empty array...
mmalc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden