• 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: NSMatrix -objectValue always gives 1. What good is that?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSMatrix -objectValue always gives 1. What good is that?


  • Subject: Re: NSMatrix -objectValue always gives 1. What good is that?
  • From: "Michael Ash" <email@hidden>
  • Date: Mon, 29 May 2006 19:09:49 -0400

On 5/29/06, Jerry Krinock <email@hidden> wrote:
on 06/05/29 13:40, Greg Herlihy at email@hidden wrote:

> I don't think objectValue will indicate which cell in a matrix is selected.
> But selectedIndex, selectedObject, selectedTag and selectedValue certainly
> sound like they would.

Indeed they do, but it seems so unCocoa-like that I have to add extra code
to handle a special case.  I just find it hard to believe that Apple (or
NeXT) would have implementedd a method which returns a useless result in one
subclass.  Oh well, maybe they made a mistake.  If no one explains this,
I'll file a bug report.  But this has apparently been true for many years.

NSMatrix is so general that any one implementation of -objectValue could never make sense all the time.

Rather than adding special code, just subclass NSMatrix and override
-objectValue to do what you need here. Then you can set the custom
class in your nib and your -objectValue using code will Just Work.

Mike
 _______________________________________________
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: 
 >Re: NSMatrix -objectValue always gives 1. What good is that? (From: Greg Herlihy <email@hidden>)
 >Re: NSMatrix -objectValue always gives 1. What good is that? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: NSMatrix -objectValue always gives 1. What good is that?
  • Next by Date: Re: KVC compliance and validation
  • Previous by thread: Re: NSMatrix -objectValue always gives 1. What good is that?
  • Next by thread: Re: NSMatrix -objectValue always gives 1. What good is that?
  • Index(es):
    • Date
    • Thread