popup menu problem

Hello all:

I have the below code to create a popup menu, and everything seems fine to me per the wiki, etc. The popup menu appears in the UI, but although the code generates no errors, the menu method does not fire. The ‘application.output’ statement correctly shows the method code, but nothing happens…any ideas of where i am going wrong? Thank you in advance.

/**
 * @properties={typeid:24,uuid:"9DD3EF2B-8887-4FA5-880B-DCEB3DAF8F83"}
 */
function rightClickShowPopup() {
	var _menu = plugins.window.createPopupMenu() ;
	var _thisForm = solutionModel.getForm( controller.getName() ) ;
	var _method = _thisForm.getMethod( 'removeColumn' ) ;
	application.output('method code: \n '+ _method.code ) ;
	_menu.addMenuItem('Remove Column', _method ) ;
	_menu.show() ;
}

/**
 * @properties={typeid:24,uuid:"D2440EE6-A144-471E-B2FF-DD2A5360B181"}
 */
function removeColumn() {
	application.output('hello remove column world.') ;
}

Try this, it works for me:

/**
* @properties={typeid:24,uuid:"9DD3EF2B-8887-4FA5-880B-DCEB3DAF8F83"}
*/
function rightClickShowPopup() {
   var _menu = plugins.window.createPopupMenu() ;
   _menu.addMenuItem('Remove Column', removeColumn ) ;
   _menu.show() ;
}

/**
* @properties={typeid:24,uuid:"D2440EE6-A144-471E-B2FF-DD2A5360B181"}
*/
function removeColumn() {
   application.output('hello remove column world.') ;
}

Thank you for your reply.

I don’t know what to say…I must have been doing something not quite right before because this code works now. I had it this way originally but was getting some errors - something about ‘[…] contains methods with different signatures’ so assumed since this form was inherited it had something to do with that. But i tried it the way you listed and it works now. So I guess I will not look a gift horse in the mouth to close for now.

Thanks again!