Tab VIews

Hello I’m trying to set a text field in a tab to something and it pops a message saying

I realized that it has to be in the tab to set the value is there a way I can be in another tab and set the value still?
Here is my code

set contents of text field "text" of view of tab view item "tab" of tab view "tabview" of window "main" to "Some text"

Try removing view:

set contents of text field "text" of tab view item "tab" of tab view "tabview" of window "main" to "Some text"

Now it says

.try also content (without s), in my projects only this form works reliably

set content of text field "text" of tab view item "tab" of tab view "tabview" of window "main" to "Some text"

I think the problem is somewhere else…

Well I’ll give you my entire code to see if it helps.

set mainwindow to window "main"
	set e to view of tab view item "e" of tab view "view" of mainwindow
	set efonttype to view of tab view item "ft" of tab view "editing" of e
	set hex_color to (call method "getHEXValue:" of class "methods" with parameter (color well "color" of efonttype))
	set contents of text field "hexcolor" of efonttype to hex_color

Does this work any better?

tell window "main"
	tell tab view item "e" of tab view "view"
		tell tab view item "ft" of tab view "editing"
			call method "getHEXValue:" of class "methods" with parameter color well "color"
			set content of text field "hexcolor" to result
		end tell
	end tell
end tell

For reference: Convert Color of Color Well to Hex String

No it does not I get the same error as removing the view

Do you want the xcode project so you can do test?
My email is GRMrGecko at gmail.com

This was causing the problem for me:

set efonttype to view of tab view item "ft" of tab view "editing" of e

The tab view in not inside the view of the tab view item (i.e., you don’t want view in your references).

This gives a different error, not the same error.

By the way, what version of Mac OS X are you on?

10.5(Leopard) There is a popup menu and i choose it thinking it would show it

I don’t know if there’s anything else I can do for you. FWIW, when I was using those methods, I was using User Defaults to save both the color well and the text field.

I’ll Just have it set and when some one wants to change it they will just click on the color well.
Basically remove the startup code

Ok I created a simple project with 2 tab views and 2 tabs in each one and had a button in tab 1 of tab view 1 and had a text box in tab 2 of tab view 2 of tab 2 of tab view 1 and once you click on the button it sets the value in the text field so I’m thinking that my project has a bug in the nib file so I’m going to recreate the nib and see if that helps