What on earth is wrong with this statement?

I’m trying to knock a menu item out of a popup button based on the architecture of the Mac it’s running on. It works, but this line:

delete (menu items of menu of popup button “tigerdisk” of tab view item “disk” of tab view “tabs” of window “mocktail” whose title = “HFS Debug…”)

breaks the syntax coloring of my script no matter where/how it’s placed. I have very similar commands in the script and none break syntax coloration. Any thoughts would be appreciated.

set myproc to do shell script "/usr/bin/arch"
	if myproc is equal to "i386" then
		delete (menu items of menu of popup button "disklist" of tab view item "disk" of tab view "tabs" of window "mail" whose title = "PowerPC")
	end if

Hi,

I’m not sure, but I think delete might want a reference instead of a list. ‘menu items’ should return a list. You might try ‘first menu item’ instead.

gl,