Referencing the parent of an object

Hey,
I have a question that I know someone has done before. I have a popup button called the “namesPop” that is in a box that is part of a tab view on a window. When the user selects an item from this button it does it’s job as:


on choose menu item theObject
	if the name of theObject is "namesPop" then
		set theName to (the title of theObject)
	end if
end choose menu item

This returns the name in the list but if I want to store the number of the selected item to reset this button later I have to do this:


on choose menu item theObject
	if the name of theObject is "namesPop" then
		set theName to (the title of theObject)
		set nameItem to contents of (popup button "namePop" of tab view item "thisTab" of tab view "thisTabView" of window "thisWin")
	end if
end choose menu item

Seems there must be someway to get the parent of the menu item, or in this case the popup button, that is referenced.

Dee

Try super view.

See also: view.