• 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
Table checkboxes problems.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Table checkboxes problems.


  • Subject: Table checkboxes problems.
  • From: Brian Christmas <email@hidden>
  • Date: Sat, 06 Aug 2011 22:13:18 +1000

G'day listers

I've got several problems.

I've got a table with 15 columns, 5 of which are checkboxes. I need the checkboxes to be editable.

1. I'd like to be able to tell which column the individual checkboxes are in when they're clicked on.

2. When a checkbox is ticked/unticked, I need to be able to update the data the table is based on, presumably via the array controller.

I've spent 10 hours trying to find out how to do this, but can't work out how to do it.

The pitiful bit of code i've got at the moment is below. Any pointers to code or references please?

Regards, and thanks.

Santa



on upDateFile_(sender)
        tell theArrayController to set tempRow to  (santasAlarmClockTable's clickedRow())  
        set tempRow to tempRow + 1
         set  theEntry1 to theData's objectAtIndex_(tempRow)'s valueForKey_("theActiveColumn")
         set  theEntry2 to theData's objectAtIndex_(tempRow)'s valueForKey_("theSpeakColumn")
         set  theEntry3 to theData's objectAtIndex_(tempRow)'s valueForKey_("theiTunesColumn")
         set  theEntry4 to theData's objectAtIndex_(tempRow)'s valueForKey_("thePlayListRandomColumn")
         set  theEntry5 to theData's objectAtIndex_(tempRow)'s valueForKey_("theDisplayFlagColumn")
         if  theEntry2 as integer = 0 and theEntry3 as integer = 0  then
           set theActiveColumn of item (tempRow) of theData to 0
        end if
        santasAlarmClockTable's reloadData()
     say tempRow
    end upDateFile_  
 _______________________________________________
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

  • Follow-Ups:
    • Re: Table checkboxes problems.
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: tab delimiter problem
  • Next by Date: Re: Table checkboxes problems.
  • Previous by thread: Re: tab delimiter problem
  • Next by thread: Re: Table checkboxes problems.
  • Index(es):
    • Date
    • Thread