home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / lang / objectiv / 725 < prev    next >
Encoding:
Text File  |  1993-01-23  |  1.5 KB  |  33 lines

  1. Newsgroups: comp.lang.objective-c
  2. Path: sparky!uunet!gatech!enterpoop.mit.edu!news.media.mit.edu!wave
  3. From: wave@media.mit.edu (Michael B. Johnson)
  4. Subject: why no class variables?
  5. Message-ID: <1993Jan22.133837.13502@news.media.mit.edu>
  6. Sender: news@news.media.mit.edu (USENET News System)
  7. Organization: MIT Media Laboratory
  8. Date: Fri, 22 Jan 1993 13:38:37 GMT
  9. Lines: 22
  10.  
  11. Hi folks.  For a project I've been doing for some time now, I need to keep
  12. some state info in the Class of a given object.  I'm annoyed by the fact
  13. that I can't add instance variables to a Class object, and have to "simulate"
  14. them with static variables.  Off the top of my head, I don't understand this
  15. restriction.  Can someone out there convince me that this is a necessary 
  16. and proper restriction?
  17.  
  18. For those who care, the situation for where I need them is that I have a set
  19. of classes which, at run-time, start up companion processes on other machines.
  20. The machines that could run a given class are queried when the class is
  21. +initialize'ed, and then when an instance of that class is requested, that
  22. list is queried to find the best host at that time to run the new instance
  23. on.  I need to keep this list of possibleHosts somewhere, and it seems 
  24. appropriate to make it a class instance variable, but as far as I can tell,
  25. there's now way in ObjC to do this.  Pleae correct me if I'm wrong...
  26.  
  27.  
  28. -- 
  29.  
  30. -->  Michael B. Johnson
  31. -->  MIT Media Lab      --  Computer Graphics & Animation Group
  32. -->  (617) 253-0663     --  wave@media-lab.media.mit.edu
  33.