Re: Tracking matrix selections
Re: Tracking matrix selections
- Subject: Re: Tracking matrix selections
- From: Tony Cate <email@hidden>
- Date: Sat, 16 Nov 2002 08:55:07 -0600
I didn't see an answer to this, so I'll give it go. I still consider
myself a newbie. If I'm completely off base the list will correct me.
A NSMatrix object is really just one big container, with a bunch of
cells that kinda report to it. Each of the cells has indentifying Tag
to facilitate identification. To tell what matrix cell is selected you
use the Super class (NSControl) method, Tag. The code might look like
this:
matrixTag = [myMatrix tag];
You would put that code in an action method connected to the Matrix.
You also have the option of creating an action method for the
individual cells in the matrix.
Every Cocoa book I've seen discusses this in detail. There have any
number of posts discussing the merits of the books available. You can
search for "cocoa books" at
http://cocoa.mamasam.com to see most of
those discussions.
On 14 Nov 2002 13:16:31 +0300, Grigory Entin wrote:
>
Hi,
>
>
I want to track selection change in NSMatrix. But I don't see any way
>
to do that..
>
>
- As far as I understand NSMatrix doesn't have notifications similar
>
to what NSTableView, NSOutlineView and NSComboBox have (I mean
>
NSTableViewSelectionDidChangeNotification etc.)
>
>
- NSMatrix delegate has nothing to do with selection too
>
>
I tried to find a method that's called every time the selecetion is
>
changed (i.e. somewhat like "designated" selector), but haven't found
>
it.
>
>
Overriding setSelectionFrom:to:anchor:, selectCellAtRow:column:,
>
selectCellWithTag: doesn't work for me, because as it happens, when
>
there's multiple selection, the only method that's called is
>
highlightCell:atRow:column: - but as far as I understand, that's
>
somewhat non-directly related to the _selection_.
>
>
It's seems I've missing something. So, has anybody experienced such
>
problems? Is there a way to go?
>
>
Thanks for any help,
>
Grigory
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.