Change the current menu item of a popup button

Hi all,

I have an application in which it is sometimes necessary to change the selected menu item of a popup button. It is important that the associated code in the choose menu item handler is run when this happens. What am I supposed to use?

Edit: I’ve just found out about the perform action command, but would still like to know if there’s a less clumsy way.