Re: Using an NSMatrix subclass for a board game view
Re: Using an NSMatrix subclass for a board game view
- Subject: Re: Using an NSMatrix subclass for a board game view
- From: Stig Brautaset <email@hidden>
- Date: Sat, 13 Oct 2007 10:24:29 +0100
On 12 Oct 2007, at 20:27, Stig Brautaset wrote:
In the long run, you might want to consider your own board view.
You are already fighting NSMatrix by providing your own mouseDown:
method (why can't Desdemona receive an action from the NSMatrix
and do the transition itself?).
I'd love to do that! I couldn't figure out how though. Using
NSMatrix seems to be somewhat under-documented. Is there a way to
configure the NSMatrix to send a 'somebody clicked me!' event to
its delegate?
Ok, responding to my self for the benefit of anyone suffering from
the same problem[0] as me in the future. I've solved my problem. I
now use a standard NSMatrix view populated with standard NSImageCell
instances.
In IB I configured the NSMatrix to be a radio type, so only one cell
can be selected, then connected the action from the NSMatrix to a
custom IBAction method on the controller.
It was as simple as that.
I'm going back to kicking myself now.
[0] not seeing the forest for all the trees.
Stig
--
http://code.brautaset.org
http://blog.brautaset.org
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden