• 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: Binding to a table selection. How?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Binding to a table selection. How?


  • Subject: Re: Binding to a table selection. How?
  • From: Ken Tozier <email@hidden>
  • Date: Tue, 30 May 2006 02:05:11 -0400


On May 30, 2006, at 1:31 AM, Scott Anguish wrote:


On May 30, 2006, at 1:20 AM, Ken Tozier wrote:

What property of a table do you bind to to get notified of user selections? I'd like to bind user selections to a property in my model object but there doesn't seem to be anything for table selections comparable to "selectedValue" property for menus.


NSTableView exposes selectionIndexes

Thanks for replying.

Here's what I'm getting when I try to bind to selectionIndexes


Settings 1: Bind to: NSArrayController Controller Key: arrangedObjects Model Key path: blank

Result:
2006-05-30 01:47:12.135 QuarkXPress[6321] *** - [_NSControllerArrayProxy firstIndex]: selector not recognized [self = 0x114af530]
2006-05-30 01:47:12.136 QuarkXPress[6321] An uncaught exception was raised
------------------------------------------------------------------------ ---


Settings 2:
Bind to: NSArrayController
Controller Key: selection
Model Key path: blank

Result:
2006-05-30 01:51:42.418 QuarkXPress[6341] *** - [_NSControllerObjectProxy count]: selector not recognized [self = 0x114afbe0]
2006-05-30 01:51:42.418 QuarkXPress[6341] An uncaught exception was raised
------------------------------------------------------------------------ ---


Settings 3:
Bind to: NSArrayController
Controller Key: selectionIndexes
Model Key path: blank

Result:
Window opens but the all the rows are empty
------------------------------------------------------------------------ ---


Settings 4:
Bind to: NSArrayController
Controller Key: selectionIndex
Model Key path: blank

Result:
2006-05-30 01:55:22.828 QuarkXPress[6377] *** -[NSCFNumber count]: selector not recognized [self = 0x1908a90]
2006-05-30 01:55:22.829 QuarkXPress[6377] An uncaught exception was raised
------------------------------------------------------------------------ ---


Settings 5:
Bind to: NSArrayController
Controller Key: selectedObjects
Model Key path: blank

Result:
2006-05-30 01:58:23.567 QuarkXPress[6412] *** -[NSCFArray firstIndex]: selector not recognized [self = 0x1910c60]
2006-05-30 01:58:23.568 QuarkXPress[6412] An uncaught exception was raised


The table is really simple. Just one column with a string in each row. I have an accessor method that seems to propagate the table OK through bindings, but I can't, for the life of me, get the selection to work.

Any ideas what I'm doing wrong?

Thanks

Ken




_______________________________________________ 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
References: 
 >Binding popup contents difficulties (From: Ken Tozier <email@hidden>)
 >Re: Binding popup contents difficulties (From: Ken Tozier <email@hidden>)
 >Re: Binding popup contents difficulties (From: Ken Tozier <email@hidden>)
 >Re: Binding popup contents difficulties [SOLVED] (From: Ken Tozier <email@hidden>)
 >Binding to a table selection. How? (From: Ken Tozier <email@hidden>)
 >Re: Binding to a table selection. How? (From: Scott Anguish <email@hidden>)

  • Prev by Date: Date Formatter Chopping off Minutes
  • Next by Date: Newbie: TicTacToe Project
  • Previous by thread: Re: Binding to a table selection. How?
  • Next by thread: Re: Binding popup contents difficulties [REVISITED]
  • Index(es):
    • Date
    • Thread