well for example, i have my shelf button created using something like:
shelfButton -docTag "usefulButton" -c "some command";
and then i have a proc that goes through all shelf buttons, queries their docTags, and returns the UI name, of the button that matches. Then once I know the name of the button, I can parent a popMenu to that UI control, with something like:
string $shelfButton =
popupMenu -p $shelfButton;
menuItem -l "someCommand" -c( "print "hullo"" );
what sort of problems were you having with popupMenu?