• 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
Setting action: with a variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting action: with a variable


  • Subject: Setting action: with a variable
  • From: Mark Manes <email@hidden>
  • Date: Tue, 27 May 2008 12:04:51 -0400

Greetings,

I am having trouble with something that should be pretty basic..

What I would like to do is set the action for NSButton programmatically where the selector is a variable.

I can't seem to find an example.

[aButton addTarget:self action:variable ....]

If I define 'variable' to be NSString it is happy but at run time I get an error stating that the target selector is Null. I can assure you that variable exists and has a value of 'buttonAction:'.

I of course have buttonAction defined as follows:

- (void) buttonActon:(id)sender


What am I doing wrong?

-mark=

_______________________________________________

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


  • Follow-Ups:
    • Re: Setting action: with a variable
      • From: Jens Alfke <email@hidden>
    • Re: Setting action: with a variable
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: unwanted tooltip in NSOutlineView (as "outLineTableColumn")
  • Next by Date: Re: 'Inheriting' a NSDateFormatterStyle
  • Previous by thread: Re: Date compiled?
  • Next by thread: Re: Setting action: with a variable
  • Index(es):
    • Date
    • Thread