home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.next.programmer
- Path: sparky!uunet!decwrl!parc!mdixon
- From: mdixon@parc.xerox.com (Mike Dixon)
- Subject: Re: Is @selector(foo:) constant?
- Message-ID: <mdixon.714778520@thelonius>
- Keywords: @selector, Objective-C, constant
- Sender: news@parc.xerox.com
- Organization: Xerox PARC
- References: <1992Aug21.180854.24973@wuecl.wustl.edu> <mdixon.714444125@thelonius>
- Date: 25 Aug 92 21:35:20 GMT
- Lines: 19
-
- ** 3.0 Incompatibility Alert! **
-
- a few days ago i wrote:
-
- the trick is that although @selector(foo:) isn't constant,
- &@selector(foo:) is. initialize your array with the addresses of
- the selectors, and remember to dereference them before you use
- them.
-
- while this was true in 2.0, a new version of the TextORama MiniExample
- that appeared today in the archives suggests that it's no longer true
- in 3.0 (i'm not a beta tester, so i can't confirm it). it appears
- that even the addresses of @selector expressions are no longer
- constant; to make this kind of code work in 3.0 you'll have to build
- the array at runtime (with calls to sel_getUid -- see the new
- TextORama for details).
- --
-
- .mike.
-