• 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
call selector @"mySelector"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

call selector @"mySelector"


  • Subject: call selector @"mySelector"
  • From: Aaron Wallis <email@hidden>
  • Date: Fri, 30 Sep 2005 23:19:05 +1000

Hi there,

I was wondering how I would go about getting cocoa to call a selector defined in a string?

for example:

- ( void ) processSomething
{
    NSString * mySelector = @"aSelector";
    [ self @selector( mySelector ) ];
}

- ( void ) aSelector
{
    NSLog ( @"aSelector Executed" );
}

which obviously doesn't work...

I know this is possible, cause we see this style of execution in objects/functions like NSBeginAlertSheet.

Any pointers guys?

Cheers !
Send instant messages to your online friends http://au.messenger.yahoo.com _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Re: call selector @"mySelector"
      • From: Jim Correia <email@hidden>
    • Re: call selector @"mySelector"
      • From: Rosyna <email@hidden>
  • Prev by Date: problems with NSOpenPanel (black rectangles)
  • Next by Date: Re: call selector @"mySelector"
  • Previous by thread: problems with NSOpenPanel (black rectangles)
  • Next by thread: Re: call selector @"mySelector"
  • Index(es):
    • Date
    • Thread