The specified object is a property, not an element (-10008)

Hi everyone,

I made an xcode app that worked beautifully in 10.2, 10.3, and 10.4-- however, it appears to be broken in 10.5

I’ve narrowed it down to the following code which is causing the problem:


			tell text view "terminal" of scroll view "terminal" of window "appwindow"
				set text color to {65535, 0, 0}
				set contents of text view "terminal" of scroll view "terminal" of window "appwindow" to my_message
			end tell

If I rem out this line then it works fine:

-- set contents of text view "terminal" of scroll view "terminal" of window "appwindow" to my_message

So, I am confused as to what changed in 10.5 which causes this to now break and give me that “The specified object is a property, not an element (-10008)” error…

Thank you in advance for any guidance.

Interesting… I seem to have solved the problem by doing this:

					tell scroll view "terminal" of window "appwindow"
						set text color of text view "terminal" to {0, 65535, 0}
						set contents of text view "terminal" to my_message
					end tell

and I don’t have a 10.4 system anymore to test if that works-- so I am doing this:


	set VersionData to word 2 of paragraph 2 of (do shell script "sw_vers")
				if VersionData < "10.5" then
					tell text view "terminal" of scroll view "terminal" of window "appwindow"
						set text color to {0, 65535, 0}
						set contents of text view "terminal" of scroll view "terminal" of window "appwindow" to my_message
					end tell
				else
					tell scroll view "terminal" of window "appwindow"
						set text color of text view "terminal" to {0, 65535, 0}
						set contents of text view "terminal" to my_message
					end tell
				end if

The fix might be related to compiling in Leopard rather than Tiger (instead of any changes you made to the code). I just encountered this error (on Leopard, when built in Tiger) and narrowed it down to a “tell window ‘main’ to update” command inside a tell block to a scroll view. Putting it outside resolved it, even when compiled on Tiger. Google this error and there is at least one more instance. I think it is some kind of bug but don’t know how to pin it down.

I’m getting the same error with this code in 10.5, but it works fine in 10.4;

tell view of tab view item "tabOS" of tab view "tabview" of window "main"
	set theCurrentValue to title of current menu item of popup button "popup"
end tell

I would appreciate any suggestions on how to get it to work in 10.4 and 10.5

Have you tried removing view?

tell tab view item "tabOS" of tab view "tabview" of window "main"
	set theCurrentValue to title of current menu item of popup button "popup"
end tell

Unfortunately, that did not work. I still get the same error message.