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

  1. Newsgroups: comp.sys.next.programmer
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!wupost!eclnews!usenet
  3. From: flan@starling.wustl.edu (Ian Flanigan)
  4. Subject: Re: Is @selector(foo:) constant?
  5. Message-ID: <1992Aug31.193647.2603@wuecl.wustl.edu>
  6. Keywords: 3.0, selector, IB, NeXTStep, Objective-C, objc
  7. Sender: usenet@wuecl.wustl.edu (Usenet Administrator)
  8. Nntp-Posting-Host: buffalo_bill
  9. Organization: Washington University, School of Engineering, St. Louis MO
  10. References: <mdixon.714778520@thelonius>
  11. Date: Mon, 31 Aug 1992 19:36:47 GMT
  12. Lines: 76
  13.  
  14. In article <mdixon.714778520@thelonius> mdixon@parc.xerox.com (Mike  
  15. Dixon) writes:
  16. >  ** 3.0 Incompatibility Alert! **
  17. >  
  18. >  a few days ago i wrote:
  19. >  
  20. >      the trick is that although @selector(foo:) isn't constant,
  21. >      &@selector(foo:) is.  initialize your array with the addresses  
  22. of
  23. >      the selectors, and remember to dereference them before you use
  24. >      them.
  25. >  
  26. >  while this was true in 2.0, a new version of the TextORama  
  27. MiniExample
  28. >  that appeared today in the archives suggests that it's no longer  
  29. true
  30. >  in 3.0 (i'm not a beta tester, so i can't confirm it).  it appears
  31. >  that even the addresses of @selector expressions are no longer
  32. >  constant; to make this kind of code work in 3.0 you'll have to  
  33. build
  34. >  the array at runtime (with calls to sel_getUid -- see the new
  35. >  TextORama for details).
  36.  
  37. Well, I just wrote and ran a small test program.  It seems that  
  38. &@selector(foo) is still constant.  (Yeah!)  I used NS3.0 PR2, but I  
  39. suspect that it's the same across all of 'em.
  40.  
  41. If you want to try it for yourself, here's a small bit-o-program for  
  42. ya:
  43. mytest.tar.Z :  
  44.  
  45. --
  46. Ian Flanigan        "You can never have too many napkins."
  47.  
  48. Project Zeus
  49. Washington University in St. Louis
  50. flan@starling.wustl.edu
  51.  
  52.  
  53. -- NewsGrazer, a NeXTstep(tm) news reader, posting --
  54. M>UQR=&8P7&%N<VE[7&9O;G1T8FQ<9C!<9FUO9&5R;B!#;W5R:65R.WT*7&UA
  55. M<F=L,3(P"EQM87)G<C$R,`I<<&%R9%QT>#DV,%QT>#$Y,C!<='@R.#@P7'1X
  56. M,S@T,%QT>#0X,#!<='@U-S8P7'1X-C<R,%QT>#<V.#!<='@X-C0P7'1X.38P
  57. M,%QF,%QB,%QI,%QU;#!<9G,R-"!);B!A<G1I8VQE(#QM9&EX;VXN-S$T-S<X
  58. M-3(P0'1H96QO;FEU<SX@;61I>&]N0'!A<F,N>&5R;W@N8V]M("A-:6ME($1I
  59. M>&]N*2!W<FET97,Z7`H^("`J*B`S+C`@26YC;VUP871I8FEL:71Y($%L97)T
  60. M(2`J*EP*/B`@7`H^("!A(&9E=R!D87ES(&%G;R!I('=R;W1E.EP*/B`@7`H^
  61. M("`@("`@=&AE('1R:6-K(&ES('1H870@86QT:&]U9V@@0'-E;&5C=&]R*&9O
  62. M;SHI(&ES;B=T(&-O;G-T86YT+%P*/B`@("`@("9`<V5L96-T;W(H9F]O.BD@
  63. M:7,N("!I;FET:6%L:7IE('EO=7(@87)R87D@=VET:"!T:&4@861D<F5S<V5S
  64. M(&]F7`H^("`@("`@=&AE('-E;&5C=&]R<RP@86YD(')E;65M8F5R('1O(&1E
  65. M<F5F97)E;F-E('1H96T@8F5F;W)E('EO=2!U<V5<"CX@("`@("!T:&5M+EP*
  66. M/B`@7`H^("!W:&EL92!T:&ES('=A<R!T<G5E(&EN(#(N,"P@82!N97<@=F5R
  67. M<VEO;B!O9B!T:&4@5&5X=$]286UA($UI;FE%>&%M<&QE7`H^("!T:&%T(&%P
  68. M<&5A<F5D('1O9&%Y(&EN('1H92!A<F-H:79E<R!S=6=G97-T<R!T:&%T(&ET
  69. M)W,@;F\@;&]N9V5R('1R=65<"CX@(&EN(#,N,"`H:2=M(&YO="!A(&)E=&$@
  70. M=&5S=&5R+"!S;R!I(&-A;B=T(&-O;F9I<FT@:70I+B`@:70@87!P96%R<UP*
  71. M/B`@=&AA="!E=F5N('1H92!A9&1R97-S97,@;V8@0'-E;&5C=&]R(&5X<')E
  72. M<W-I;VYS(&%R92!N;R!L;VYG97)<"CX@(&-O;G-T86YT.R!T;R!M86ME('1H
  73. M:7,@:VEN9"!O9B!C;V1E('=O<FL@:6X@,RXP('EO=2=L;"!H879E('1O(&)U
  74. M:6QD7`H^("!T:&4@87)R87D@870@<G5N=&EM92`H=VET:"!C86QL<R!T;R!S
  75. M96Q?9V5T56ED("TM('-E92!T:&4@;F5W7`H^("!497AT3U)A;6$@9F]R(&1E
  76. M=&%I;',I+EP*7`I796QL+"!)(&IU<W0@=W)O=&4@86YD(')A;B!A('-M86QL
  77. M('1E<W0@<')O9W)A;2X@($ET('-E96US('1H870@)D!S96QE8W1O<BAF;V\I
  78. M(&ES('-T:6QL(&-O;G-T86YT+B`@*%EE86@A*2`@22!U<V5D($Y3,RXP(%!2
  79. M,BP@8G5T($D@<W5S<&5C="!T:&%T(&ET)W,@=&AE('-A;64@86-R;W-S(&%L
  80. M;"!O9B`G96TN7`I<"DEF('EO=2!W86YT('1O('1R>2!I="!F;W(@>6]U<G-E
  81. M;&8L(&AE<F4G<R!A('-M86QL(&)I="UO+7!R;V=R86T@9F]R('EA.EP*;7ET
  82. M97-T+G1A<BY:(#H@"GM[7$Y'1&]C=6UE;G0Q,#DV('T*K'U<<&%R9%QT>#DV
  83. M,%QT>#$Y,C!<='@R.#@P7'1X,S@T,%QT>#0X,#!<='@U-S8P7'1X-C<R,%QT
  84. M>#<V.#!<='@X-C0P7'1X.38P,%QF,%QB,%QI,%QU;#!<9G,R-"!<"@I<"BTM
  85. M7`I)86X@1FQA;FEG86X)"2)9;W4@8V%N(&YE=F5R(&AA=F4@=&]O(&UA;GD@
  86. M;F%P:VEN<RXB7`I<"E!R;VIE8W0@6F5U<UP*5V%S:&EN9W1O;B!5;FEV97)S
  87. M:71Y(&EN(%-T+B!,;W5I<UP*9FQA;D!S=&%R;&EN9RYW=7-T;"YE9'5<"@I]
  88. !"G1Y
  89. `
  90.