Re: setAction:@selector is not working ?
Re: setAction:@selector is not working ?
- Subject: Re: setAction:@selector is not working ?
- From: Graham Cox <email@hidden>
- Date: Sat, 20 Feb 2010 20:39:02 +1100
On 20/02/2010, at 7:45 AM, David M. Cotter wrote:
> NSMenuItem* nsMenuItem([platMenu itemAtIndex: itemIndexS]);
> DVAMacMenuItem* dvaItem((DVAMacMenuItem *)nsMenuItem);
>
> [dvaItem setAction:@selector(dispatchMenuSelection:)];
> [dvaItem setTarget: dvaItem];
Maybe there's some side-effect of making the target the item itself. It's certainly extremely unusual to do that, and would tend to suggest MVC is being violated. It possible that NSMenuItem's designers didn't anticipate that possibility and that's what's hitting you. Try setting the target to something else and see if that target gets called in the same pattern.
--Graham
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden