Article View: comp.sys.next.programmer
Article #1265Is @selector(foo:) constant?
From: Ian Flanigan
Date: Fri, 21 Aug 1992 18:08
Date: Fri, 21 Aug 1992 18:08
24 lines
1236 bytes
1236 bytes
Today I was trying to manually initialize an array that would associate a bunch
of selectors. I tried:
static unsigned int my_array[][3] =
{
{ 1, @selector(foo:), @selector(bar) },
...
}
The compiler came back and said:
initializer for static variable is not constant
So I tried making it non-static. No good. (Didn't think it would help :-) It
therefore appears that @selector(foo:) does not generate something constant.
Does anyone know what it _does_ generate? Anyone have a better idea than to
use strings and sel_getUid() instead?
Thanks.
--
Ian Flanigan "You can never have too many napkins."
Project Zeus
Washington University in St. Louis
flan@starling.wustl.edu
Technical Details
Message-ID:
<1992Aug21.180854.24973@wuecl.wustl.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!wupost!eclnews!usenetShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!sdd.hp.com!wupost!eclnews!usenet From: flan@starling.wustl.edu (Ian Flanigan) Subject: Is @selector(foo:) constant? Message-ID: <1992Aug21.180854.24973@wuecl.wustl.edu> Keywords: @selector, Objective-C, constant Sender: usenet@wuecl.wustl.edu (Usenet Administrator) Nntp-Posting-Host: buffalo_bill Organization: Washington University, School of Engineering, St. Louis MO Date: Fri, 21 Aug 1992 18:08:54 GMT Lines: 24