Re: NSExpression
Re: NSExpression
- Subject: Re: NSExpression
- From: Shawn Erickson <email@hidden>
- Date: Sat, 28 Jun 2008 07:43:40 -0700
- Delivered-to: email@hidden
- Delivered-to: email@hidden
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:references:message-id:from:to :in-reply-to:content-type:x-mailer:mime-version:subject :content-transfer-encoding:date:cc; bh=FaM/HVaqWnm3vR7XXPrRmxj+jyavsUm+xVxchiSjHSo=; b=pjSE014kK0XiGU0D8DkHavtzANVP8kY5y1q/MsQ1add+BYN1nI4izA7lHzta10rW0u IQb5KD5MNoJ6Nkn7rhWNhC/pit54ve4q4lNQ7VfntiXE+Xdmllf2+ru1dDjs+2PXv3oN C56JVOvAtz8YB5aE9jfLylXJJejlNsbIJwF1o=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=references:message-id:from:to:in-reply-to:content-type:x-mailer :mime-version:subject:content-transfer-encoding:date:cc; b=MsT9a6udKhSgr9GZ+U+FVtZExZkrxwoAdVnzM+V5222VrQ0gcw7aPORX6HiBlgWPNb cPo00uh0BK0WS20cEtIS3ijmQKO40qv9+rSFwjn9LIrVrPEdxI8zM8tH6RVrrTApqjZk /qDQqwmqTG9SGhTL6XEcGmKQtjFegzjwvr79Q=
On Jun 28, 2008, at 12:13 AM, Chris <email@hidden> wrote:
NSExpression defines this method:
+ (NSExpression *)expressionForFunction:(NSString *)name arguments:
(NSArray *)parameters
and the doco provides this example:
[NSExpression expressionForFunction:(@selector(random))
arguments:nil];
Isn't that wrong? Can you really pass a selector to a NSString
argument? The compiler is complaining, and the program crashes when
I attempt.
Yeah it is wrong. I believe you just pass a string with the same
contents as what you would put in @selector.
-shawn
_______________________________________________
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
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE
Contact Apple | Terms of Use | Privacy Policy
Copyright © 2011 Apple Inc. All rights reserved.