• 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: Using an NSMatrix subclass for a board game view
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Using an NSMatrix subclass for a board game view (From: Brautaset Stig <email@hidden>)
 >Re: Using an NSMatrix subclass for a board game view (From: Fritz Anderson <email@hidden>)
 >Re: Using an NSMatrix subclass for a board game view (From: Stig Brautaset <email@hidden>)

  • Prev by Date: Re: NSProgressIndicator needs -display after -setDoubleValue
  • Next by Date: Re: initializing images with view contents, then displaying those images instead of the view
  • Previous by thread: Re: Using an NSMatrix subclass for a board game view
  • Next by thread: WebView - intercepting data before load
  • Index(es):
    • Date
    • Thread