home *** CD-ROM | disk | FTP | other *** search
/ Peanuts NeXT Software Archives / Peanuts-2.iso / Developer / resources / classes / misckit / MiscKit.mbox / text0050.txt < prev    next >
Encoding:
Text File  |  1993-10-26  |  1.0 KB  |  49 lines

  1. One thing that might be a good idea is to take a surreptitious peek at the NXString class which NeXT  
  2. still hasn't documented yet, but the compiler knows about.  It would be nice if the stuff we came up  
  3. with would seamlessly integrate with what NeXT will eventually let us see....
  4.  
  5.  
  6. P.S.  If you want to peek, compile the following snippet, and go exploring with gdb....
  7.  
  8.  
  9. -----------------------------
  10. #import <objc/Object.h>
  11. #import <stdio.h>
  12.  
  13. @interface NXString : Object
  14. {}
  15. @end
  16.  
  17. @interface NXSimpleReadOnlyString : NXString
  18. {
  19.     char *characters;
  20.     unsigned _length;
  21. }
  22. @end
  23.  
  24. @interface NXConstantString : NXSimpleReadOnlyString
  25. {}
  26. @end
  27.  
  28. main()
  29. {
  30.   id string = @"hi there";
  31.     int k;
  32.  
  33.   printf("The class name is %s\n", [string name]);
  34.         
  35.     for(k=0;k<5;k++)
  36.         fprintf(stderr,"%d\n",k);
  37.     
  38.     exit(0);
  39. }
  40.  
  41.  
  42. -----------------------------
  43.  
  44. ---
  45. John Feiler                             jjfeiler@relief.com
  46. 4926 152nd St. SW                       NeXTmail Welcome!!!
  47. Edmonds, WA  98026-4433      Independent NeXTSTEP Developer 
  48.  
  49.