• 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: NSButtonCell not changing selection in table...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSButtonCell not changing selection in table...


  • Subject: Re: NSButtonCell not changing selection in table...
  • From: Hamish Allan <email@hidden>
  • Date: Mon, 3 Feb 2003 23:19:24 +0000

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

NSTableView has a tableView: shouldSelectRow: delegate method; I don't suppose that tableView: setObjectValue: forTableColumn: row: gets called before that (when you change your checkbox selection), but if it does, you could keep a duplicate array of on/off values, checking it against the table's data source in tableView: shouldSelectRow: to determine whether the user selected the row by checking the box or selected it elsewhere, to return true or false before updating the value in the duplicate array.

Alternatively (if the checkbox value is not changed until tableView: shouldSelectRow: has been called) you could use the same technique to determine whether or not changing the selection in your table really should invoke the other code, calling deselectRow: on your tableview if not (you might need to record the previous selection). This might, however, give the appearance of the row being selected briefly.

Hope this helps,
Hamish

On Monday, Feb 3, 2003, at 18:17 Europe/London, Rob In der Maur wrote:

I have a column of NSButtonCells (type checkboxes/switch buttons) in my table and I would like to click on those checkboxes and subsequently change their value, without actually changing the selection in my table, because changing the selection in my table invokes a lot of other code, which is really not necessary at this point. I basically just want to change the status of a row in a table view (visualized by the checkbox) without really selecting it.

Is this possible without subclassing NSTableView?

cheers
Rob

o#?
Rob In der Maur
_______________________________________________
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.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (Darwin)

iD8DBQE+PvkA6gc2d//pELYRAlkdAKDOUwuVKO0W/kfANMldkmPDJx3mcgCeIys2
Irfgtx/9HvJysvS6c1gcZEA=
=U61k
-----END PGP SIGNATURE-----
_______________________________________________
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.

References: 
 >NSButtonCell not changing selection in table... (From: Rob In der Maur <email@hidden>)

  • Prev by Date: Setting the action for a menu item
  • Next by Date: Re: NSLayoutManager question
  • Previous by thread: NSButtonCell not changing selection in table...
  • Next by thread: NSSwap
  • Index(es):
    • Date
    • Thread