Re: NSMatrix -objectValue always gives 1. What good is that?
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