home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / next / programm / 5827 < prev    next >
Encoding:
Text File  |  1992-08-27  |  1.1 KB  |  32 lines

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!decwrl!parc!mdixon
  3. From: mdixon@parc.xerox.com (Mike Dixon)
  4. Subject: Re: Is @selector(foo:) constant?
  5. Message-ID: <mdixon.714778520@thelonius>
  6. Keywords: @selector, Objective-C, constant
  7. Sender: news@parc.xerox.com
  8. Organization: Xerox PARC
  9. References: <1992Aug21.180854.24973@wuecl.wustl.edu> <mdixon.714444125@thelonius>
  10. Date: 25 Aug 92 21:35:20 GMT
  11. Lines: 19
  12.  
  13. ** 3.0 Incompatibility Alert! **
  14.  
  15. a few days ago i wrote:
  16.  
  17.     the trick is that although @selector(foo:) isn't constant,
  18.     &@selector(foo:) is.  initialize your array with the addresses of
  19.     the selectors, and remember to dereference them before you use
  20.     them.
  21.  
  22. while this was true in 2.0, a new version of the TextORama MiniExample
  23. that appeared today in the archives suggests that it's no longer true
  24. in 3.0 (i'm not a beta tester, so i can't confirm it).  it appears
  25. that even the addresses of @selector expressions are no longer
  26. constant; to make this kind of code work in 3.0 you'll have to build
  27. the array at runtime (with calls to sel_getUid -- see the new
  28. TextORama for details).
  29. --
  30.  
  31.                                              .mike.
  32.