no sender sent to button action
wtholliday opened this issue · 0 comments
wtholliday commented
If the QBPopupMenuItem
was the sender, a single action could handle multiple menu items. This is good when the menu items are generated programatically.
For example:
- (void)contextMenuItemSelected:(id)sender {
QBPopupMenuItem *item = (QBPopupMenuItem*) sender;
assert(item); // This currently fails.
[self performCommandNamed: item.title];
}
This change is as simple as modifying -[QBPopupMenuItemView performAction]
:
[self.item.target performSelector:self.item.action withObject:self.item afterDelay:0];