How do you disable a popup button (not using IB)

I have a AppleScript Studio app that has a popup button. Once the user clicks a 2nd regular button in the UI, I want to “grey out” or disable the popup button so the user cannot go back and change the selection.
I’ve tried using the standard command that works for a regular button, but that doesn’t seem to work:

set enabled of popup button "popupButton" of window "main" to false 

I’ve tried changing it from popup button, to just button, to anything else I can think of and can’t find a way to get the popup to disable.

Anybody know the correct phrase to do this? Like I said this works for any standard button:

set enabled of button "regularButton" of window "main" to false

I just can’t do it for a popup button.

Thanks in advance!

You appear to have the correct syntax. I tried it in one of my apps I’m working on now and it worked fine. Maybe you have a typo or named one of the objects incorrectly??

set enabled of popup button “mypopup” of window “mainwindow” to false

Yeah, weird. I must have quadruple checked my button name, but I had it wrong. It works now.
I hate stupid mistakes…