I have a custom class that supports the target-action mechanism but oddly in this specific case, when I try to call the action by executing:
[NSApp sendAction:action_ to:target_ from:self]
it doesn't work, but this way does:
[target_ performSelector:action_ withObject:self];
Obviously both target_
and action_
have valid values.
This is not a big deal as I got it working.
I just can't figure out why -[NSApplication sendAction:to:from:]
would not work, as this looks like a pretty basic operation. I've been using sendAction:...
in the past without a problem but there seems to be some significant difference between these two, apart from the fact that sendAction
has a mechanism to look for an object that responds to the message if its target is nil
.