[check box and tab view item]


I have a tab view with 4 tab item. In each of tab item, I have several check box (among radio button, and 3 push button).
now, I’d like to check the status of all my check box whithin each of my tab item.

So is there a way to go througth each check box of each item using a repeat procedure ?

thanks for help :wink:

here the code where I’m fixed … grrrrr

repeat with i from 1 to 4 --> my 4 tab item
	set tabName to (name of tab view item i of tab view biasTab of window "BiasSeeker") --> to get the name of the tab view item
	set mtx to tabName & "Mtx" --> to get the name of the matrix object
	set stdz to getStandardizationStatus(mtx, tabName, biasTab) --> to get the current selected column of mtx
	display dialog tabName & " : " & stdz --> to check if every thing is going fine ....
end repeat


I recommend to save each status in its own variable
in the handlers, the status will be changed in

as I have 37 checkbox, i wanted to avoid to give their own variable…

In deed , I’m looking for something like :

set result to “”
foreach checkbox of tab view item
set result to (result & (title of checkbox) & (state of checkbox))

Are they designed to be persistent across launches? That is, if I set up my buttons and checkboxes, quit, and relaunch, should they be what I last set them to?

If so, use Cocoa bindings instead, and eliminate your glue code entirely. After binding the values of the controls to defaults values, you can just ask the user defaults system for the key values.

I’ve haven’t tested this.

set buttonValues to {}
repeat with thisTabViewItem in (tab view items of tab view biasTab of window "BiasSeeker")
		set end of buttonValues to {"", "Tab View Item \"" & thisTabViewItem's name & "\"", ""}
		repeat with thisButton in (buttons of thisTabViewItem)
				set end of buttonValues to (thisButton's name & ": " & thisButton's state)
			end try
		end repeat
	end try
end repeat

set ASTID to AppleScript's text item delimiters
set AppleScript's text item delimiters to (ASCII character 10) -- new line
set buttonValues to text 2 thru -1 of ("" & buttonValues)
set AppleScript's text item delimiters to ASTID

log buttonValues -- or whatever you want to do with this text

Bruce Phillips did the trick !!!
whaw !!!

thank a lot for that !!