🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #826

Re: Is @selector(foo:) constant?

#826
From: Mike Dixon
Date: Tue, 25 Aug 1992 21:35
19 lines
1200 bytes
** 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.
Technical Details
Message-ID: <mdixon.714778520@thelonius>
Path: arc1-ca.pugleaf.net!sparky!uunet!decwrl!parc!mdixon
References: <1992Aug21.180854.24973@wuecl.wustl.edu> <mdixon.714444125@thelonius>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!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