Article View: comp.lang.lisp.x
Article #122Accessing Class Variables
From: Shaun Smith
Date: Tue, 31 Jul 1990 23:15
Date: Tue, 31 Jul 1990 23:15
25 lines
1303 bytes
1303 bytes
I'm new to xlisp but familiar wit other object-oriented languages
such as CLOS, Smalltalk and C++. What I'm trying to do is access
the class variables of a class through the class object.
eg.
(setq tools (send class :new '(power moveable) '(number)))
Now I want a reader function (in CLOS jargon) for the class object
"tools" that will let me find read the value of number.
Can anyone tell me how to do it? I don't want to have to go through
an instance of class tools to do it.
If anyone can tell me I'd be grateful.
Thanks in advance,
Shaun
Shaun M. Smith | ssmith@joplin.mpr.ca
MPR Teltech Ltd. | joplin.mpr.ca!ssmith@uunet.uu.net
8999 Nelson Way, Burnaby, BC | ssmith%joplin.mpr.ca@relay.ubc.ca
Canada, V5A 4B5, (604) 293-5345 | ...!ubc-vision!joplinmpr.ca!ssmith
Technical Details
Message-ID:
<2274@kiwi.mpr.ca>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!ubc-cs!kiwi!rhumba.mpr.ca!ssmithShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!mit-eddie!uw-beaver!ubc-cs!kiwi!rhumba.mpr.ca!ssmith From: ssmith@rhumba.mpr.ca (Shaun Smith) Newsgroups: comp.lang.lisp.x Subject: Accessing Class Variables Keywords: class, variable Message-ID: <2274@kiwi.mpr.ca> Date: 31 Jul 90 23:15:02 GMT Sender: news@eric.mpr.ca Reply-To: ssmith@rhumba.mpr.ca (Shaun Smith) Organization: Microtel Pacific Research Ltd. (MPR) Lines: 25