• 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
clicking in NSMatrix.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

clicking in NSMatrix.


  • Subject: clicking in NSMatrix.
  • From: Oscar Morales Vivó <email@hidden>
  • Date: Mon, 5 May 2003 20:06:19 +0200

Greetings there. Maybe someone can help me with my NSMatrix troubles.

I have a NSMatrix of checkboxes. I wanted to use the tag of each checkbox to know what to modify when they were clicked, and assigned to each one of the cells' target an action (which is the same for all of them). However, when I run the program, the sender of the action that is performed when I click on one of the checkboxes isn't the button cell, but the NSMatrix, so I can't just use [sender tag] to know what to do (that action can also be called from menu items, so I wanted to avoid type-checking)

Is that a bug of a feature? I figured a matrix cell would send itself as the sender of an action if set to have one, but I might be wrong. And if the NSMatrix is meant to be the sender, it makes for not very elegant code.

Any good advice on how to keep the code the same for menus & checkboxes and avoid having these problems will be greatly appreciated.

/*
Oscar Morales Vivs

Eternal Computer Science Student. Master of C++ Templates. Cocoa Nut. Computer Graphics Illuminati. UI Guru in Training. Dabbler in all things CS and most which are not.

Web stuff: http://homepage.mac.com/oscarmv/
*/
_______________________________________________
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.

  • Follow-Ups:
    • Re: clicking in NSMatrix.
      • From: email@hidden
  • Prev by Date: checking to see if the application exists in a certain location
  • Next by Date: Re: clicking in NSMatrix.
  • Previous by thread: Re: checking to see if the application exists in a certain location
  • Next by thread: Re: clicking in NSMatrix.
  • Index(es):
    • Date
    • Thread