Referring to Things in a Tab.

Hi all. I have just really jumped into Applescript programing and am creating a program to help me with a workflow. The issue have been wrestling with for several days now is how to reference items that are in tabs, in such a way that I don’t get errors.

I have a window called “main” and I have a large Tab-View area which takes up my whole window I have given this the label “toolKit” (if I understand the labeling scheme correctly.). The tab I am currently trying to access is called “sortAndRename”. In this tab is a text item (label) called “organizedOverTotal”

My code is in the “awake on nib” section and is as such:

set content of text field "organizedOverTotal" of window "main" to "stuff"

To which I get this applescript error:

So I try this code instead:

set content of text field "organizedOverTotal" of tab view "sortAndName" of tab "toolKit" of window "main" to "stuff"

Which produces this build-time error:

This:

tell tab view 1 of window 1
		set content of text field "organizedOverTotal" to "stuff"
	end tell

gives me this:

I don’t know where to go from here. I’ve tried all that I can. I’ve searched for documented info, but I’m not finding anything that helps. I can get text fields outside of tabs to change, but I just can’t get ones inside tabs to change.

Any help would be most appreciated. Thanks much.

Tab views contain tab view items.

set content of text field "organizedOverTotal" of tab view item "sortAndName" of tab view "toolKit" of window "main" to "stuff"

Edit: Is this text field the object that is connected to the awake from nib handler?

on awake from nib theObject
	set content of theObject to "stuff"
end awake from nib

Thank you ever so much!

There were two problems I was having. One was that I needed to add the second tab view, but probably more importantly, the text field wasn’t bound to the script.

As an afterthought this makes perfect sense, because I had run into some “don’t have access/don’t have permission/can’t write” errors that were really confusing.

I think it’s time to check all my other bindings as well.

Thanks again!