Popup Button Woes

I’m having a lot of trouble using a popup button. In short, I want to display information in four different text boxes based on the user’s selection in a popup button. I can’t get the fields to update though.

The problem, I think, is the way I’ve been reading the popup button. What I’ve done so far is,

on choose menu item theObject

 -- set window
 set theWindow to window of theObject
	
 -- read contents of popup button
  set computerName to title of current menu item of popup button "computers" of theWindow

end choose menu item

Any suggestions? Perhaps I’m not using the right event, but either way, I cannot figure it out. Thanks…


You can use this:

on action theObject
	set x to contents of popup button "whatever" of window "whatever"
	--> or, for the title:
	set y to title of current menu item of popup button "whatever" of window "whatever"
end action