• 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: Checkbox in an NSTable, not getting right selectedObject()...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checkbox in an NSTable, not getting right selectedObject()...


  • Subject: Re: Checkbox in an NSTable, not getting right selectedObject()...
  • From: Jeff Dyck <email@hidden>
  • Date: Mon, 21 Mar 2011 14:08:51 -0700

That does the trick!  Thanks Harald!  I'm *slowly* comprehending the different way of doing things from ASS to ASoC... Takes a while to really "get" the new way.  I think this will translate much better to my eventual move to Obj-C.

Yes. The problem is that the the NSButton is clicked before the array controller is informed of the currently selected row, so you can't query the array controller for its selected objects because it might be from the previously selected row. Instead, ask for the clicked row of the table and explicitly set the selection:

tell groupController to setSelectionIndex_(theTable's clickedRow())

(Note: you have to bind the variable theTable in IB to the actual table.)
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Checkbox in an NSTable, not getting right selectedObject()... (From: Jeff Dyck <email@hidden>)
 >Re: Checkbox in an NSTable, not getting right selectedObject()... (From: Harald E Brandt <email@hidden>)

  • Prev by Date: Re: Checkbox in an NSTable, not getting right selectedObject()...
  • Next by Date: Countdown timer
  • Previous by thread: Re: Checkbox in an NSTable, not getting right selectedObject()...
  • Next by thread: Countdown timer
  • Index(es):
    • Date
    • Thread