04-15-2010 10:27 PM
I have an add-in to the messaging application menu using the ApplicationMenuItemRepository#addMenuItem function with MENUITEM_EMAIL_EDIT and an instance of my own ApplicationMenuItem. It would be great if I could not show this menu entry based on attributes of the message being composed; specifically, exactly like the Send menu entry behaves. The Send menu entry only shows up if the message has email addresses and is ready to be sent.
After thoroughly reading the documentation for AMIR#addMenuItem and MENUITEM_EMAIL_EDIT, it does not seem like this is possible. The MENUITEM_EMAIL_EDIT constant does not specify anything to provide for the ApplicationDescriptor object or context object to addMenuItem. I've found that ApplicationMenuItem#toString is not the place to do this.
Ideally, any solution would work on OS 4.2.1 and above, but 4.3 would be fine.