• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Figuring out which values are selected in an NSTableView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Figuring out which values are selected in an NSTableView
      • From: Denis Stanton <email@hidden>
References: 
 >Figuring out which values are selected in an NSTableView (From: Andrew White <email@hidden>)
 >Re: Figuring out which values are selected in an NSTableView (From: Scott Anguish <email@hidden>)
 >Re: Figuring out which values are selected in an NSTableView (From: Denis Stanton <email@hidden>)

  • Prev by Date: Re: How best to archive in CSV format
  • Next by Date: Trying to solve a to-many relationship?
  • Previous by thread: Re: Figuring out which values are selected in an NSTableView
  • Next by thread: Re: Figuring out which values are selected in an NSTableView
  • Index(es):
    • Date
    • Thread