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