• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: setAction:@selector is not working ?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

References: 
 >setAction:@selector is not working ? (From: "David M. Cotter" <email@hidden>)
 >Re: setAction:@selector is not working ? (From: Graham Cox <email@hidden>)
 >Re: setAction:@selector is not working ? (From: "David M. Cotter" <email@hidden>)
 >Re: setAction:@selector is not working ? (From: Jens Alfke <email@hidden>)
 >Re: setAction:@selector is not working ? (From: "David M. Cotter" <email@hidden>)
 >Re: setAction:@selector is not working ? (From: "Hank Heijink (Mailinglists)" <email@hidden>)
 >Re: setAction:@selector is not working ? (From: "David M. Cotter" <email@hidden>)

  • Prev by Date: Re: initWithCoder / unarchiveObjectWithData Memory Management Question
  • Next by Date: Re: initWithCoder / unarchiveObjectWithData Memory Management Question
  • Previous by thread: Re: setAction:@selector is not working ?
  • Next by thread: Re: setAction:@selector is not working ?
  • Index(es):
    • Date
    • Thread