Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Extracting class slot names
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ron Garret  
View profile  
 More options Dec 15 2008, 6:10 pm
Newsgroups: comp.lang.lisp
From: Ron Garret <rNOSPA...@flownet.com>
Date: Mon, 15 Dec 2008 15:10:11 -0800
Local: Mon, Dec 15 2008 6:10 pm
Subject: Extracting class slot names
Is there a portable way to get a list of the names of all the slots in a
class?  I know about class-slots (and class-direct-slots) but these
return (apparently) opaque slot-definition objects from which the name
cannot be portably extracted.

Thanks,
rg


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Marcus Breiing  
View profile  
 More options Dec 15 2008, 6:22 pm
Newsgroups: comp.lang.lisp
From: Marcus Breiing <use...@2008w49.mail.breiing.com>
Date: 16 Dec 2008 00:22:52 +0100
Local: Mon, Dec 15 2008 6:22 pm
Subject: Re: Extracting class slot names
* Ron Garret

> I know about class-slots (and class-direct-slots) but these return
> (apparently) opaque slot-definition objects from which the name
> cannot be portably extracted.

Try to call SLOT-DEFINITION-NAME on these objects, which should be
about as (non-)portable as CLASS-SLOTS itself.

    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Joswig  
View profile  
 More options Dec 15 2008, 6:25 pm
Newsgroups: comp.lang.lisp
From: Rainer Joswig <jos...@lisp.de>
Date: Tue, 16 Dec 2008 00:25:41 +0100
Local: Mon, Dec 15 2008 6:25 pm
Subject: Re: Extracting class slot names
In article <rNOSPAMon-E37E7B.15101115122...@news.gha.chartermi.net>,
 Ron Garret <rNOSPA...@flownet.com> wrote:

> Is there a portable way to get a list of the names of all the slots in a
> class?  I know about class-slots (and class-direct-slots) but these
> return (apparently) opaque slot-definition objects from which the name
> cannot be portably extracted.

> Thanks,
> rg

CL-USER 82 > (defclass foobaz () (a b))
#<STANDARD-CLASS FOOBAZ 402000850B>

CL-USER 83 > (class-direct-slots *)
(#<STANDARD-DIRECT-SLOT-DEFINITION A 412021FACB> #<STANDARD-DIRECT-SLOT-DEFINITION B 412021FAE3>)

CL-USER 84 > (slot-definition-name (first *))
A

I which packages the functions are is implementation
dependent. Also not every implementation
stores slot-information as slot-definition
objects.

--
http://lispm.dyndns.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ron Garret  
View profile  
 More options Dec 15 2008, 6:44 pm
Newsgroups: comp.lang.lisp
From: Ron Garret <rNOSPA...@flownet.com>
Date: Mon, 15 Dec 2008 15:44:14 -0800
Local: Mon, Dec 15 2008 6:44 pm
Subject: Re: Extracting class slot names
In article <k0tvmt4zjw...@breiing.com>,
 Marcus Breiing <use...@2008w49.mail.breiing.com> wrote:

> * Ron Garret

> > I know about class-slots (and class-direct-slots) but these return
> > (apparently) opaque slot-definition objects from which the name
> > cannot be portably extracted.

> Try to call SLOT-DEFINITION-NAME on these objects, which should be
> about as (non-)portable as CLASS-SLOTS itself.

Just what I was looking for.  Thanks!

rg


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ron Garret  
View profile  
 More options Dec 15 2008, 6:44 pm
Newsgroups: comp.lang.lisp
From: Ron Garret <rNOSPA...@flownet.com>
Date: Mon, 15 Dec 2008 15:44:50 -0800
Local: Mon, Dec 15 2008 6:44 pm
Subject: Re: Extracting class slot names
In article <joswig-87C86B.00254016122...@news-europe.giganews.com>,
 Rainer Joswig <jos...@lisp.de> wrote:

Just what I needed.  Thanks!

rg


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Pascal Costanza  
View profile  
 More options Dec 16 2008, 12:32 am
Newsgroups: comp.lang.lisp
From: Pascal Costanza <p...@p-cos.net>
Date: Tue, 16 Dec 2008 06:32:04 +0100
Local: Tues, Dec 16 2008 12:32 am
Subject: Re: Extracting class slot names

Ron Garret wrote:
> Is there a portable way to get a list of the names of all the slots in a
> class?  I know about class-slots (and class-direct-slots) but these
> return (apparently) opaque slot-definition objects from which the name
> cannot be portably extracted.

> Thanks,
> rg

(mapcar #'slot-definition-name (class-slots some-class))

--
My website: http://p-cos.net
Common Lisp Document Repository: http://cdr.eurolisp.org
Closer to MOP & ContextL: http://common-lisp.net/project/closer/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicolas Edel  
View profile  
 More options Dec 16 2008, 5:22 am
Newsgroups: comp.lang.lisp
From: Nicolas Edel <nicolas.e...@gmail.com>
Date: Tue, 16 Dec 2008 02:22:48 -0800 (PST)
Local: Tues, Dec 16 2008 5:22 am
Subject: Re: Extracting class slot names
On Dec 16, 12:25 am, Rainer Joswig <jos...@lisp.de> wrote:

> [...]
> CL-USER 83 > (class-direct-slots *)

Sorry for the clearly out of topic question, but any idea where I
could find documentation about this '*' variable ? Hard to google
about '*' or 'start' symbol !

-Nicolas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Joswig  
View profile  
 More options Dec 16 2008, 5:36 am
Newsgroups: comp.lang.lisp
From: Rainer Joswig <jos...@lisp.de>
Date: Tue, 16 Dec 2008 11:36:46 +0100
Local: Tues, Dec 16 2008 5:36 am
Subject: Re: Extracting class slot names
In article
<4c943efd-f5a8-46e3-b76f-a26df95a9...@e25g2000vbe.googlegroups.com>,
 Nicolas Edel <nicolas.e...@gmail.com> wrote:

> On Dec 16, 12:25 am, Rainer Joswig <jos...@lisp.de> wrote:
> > [...]
> > CL-USER 83 > (class-direct-slots *)

> Sorry for the clearly out of topic question, but any idea where I
> could find documentation about this '*' variable ? Hard to google
> about '*' or 'start' symbol !

> -Nicolas

* is the last value
** the value before that
*** the value before that

See also  -, + and /

HyperSpec, Symbol Index, Non-Alphabetic

http://www.lispworks.com/documentation/HyperSpec/Front/X_Alph_9.htm

Variable *, **, ***
http://www.lispworks.com/documentation/HyperSpec/Body/v__stst_.htm

When you use LispWorks, c-sh-d on a symbol shows the
documentation for the symbol in a web browser...

--
http://lispm.dyndns.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zach Beane  
View profile  
 More options Dec 16 2008, 6:15 am
Newsgroups: comp.lang.lisp
From: Zach Beane <x...@xach.com>
Date: Tue, 16 Dec 2008 06:15:18 -0500
Local: Tues, Dec 16 2008 6:15 am
Subject: Re: Extracting class slot names

Nicolas Edel <nicolas.e...@gmail.com> writes:
> On Dec 16, 12:25 am, Rainer Joswig <jos...@lisp.de> wrote:
>> [...]
>> CL-USER 83 > (class-direct-slots *)

> Sorry for the clearly out of topic question, but any idea where I
> could find documentation about this '*' variable ? Hard to google
> about '*' or 'start' symbol !

http://l1sp.org/cl/* will get you there (most other CL symbols work
too).

Zach


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Rainer Joswig  
View profile  
 More options Dec 16 2008, 6:41 am
Newsgroups: comp.lang.lisp
From: Rainer Joswig <jos...@lisp.de>
Date: Tue, 16 Dec 2008 12:41:22 +0100
Local: Tues, Dec 16 2008 6:41 am
Subject: Re: Extracting class slot names
In article <m3vdtks75l....@unnamed.xach.com>,
 Zach Beane <x...@xach.com> wrote:

> Nicolas Edel <nicolas.e...@gmail.com> writes:

> > On Dec 16, 12:25 am, Rainer Joswig <jos...@lisp.de> wrote:
> >> [...]
> >> CL-USER 83 > (class-direct-slots *)

> > Sorry for the clearly out of topic question, but any idea where I
> > could find documentation about this '*' variable ? Hard to google
> > about '*' or 'start' symbol !

> http://l1sp.org/cl/* will get you there (most other CL symbols work
> too).

> Zach

If all fails (no internet connection, no browser, ...) there is
still hope:

CL-USER 103 > (documentation '* 'variable)
"Holds the value of the most recent top-level EVAL."

CL-USER 104 > (documentation 'documentation 'function)
"Returns the documentation string associated with the given object (if any)."

--
http://lispm.dyndns.org/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicolas Edel  
View profile  
 More options Dec 16 2008, 8:00 am
Newsgroups: comp.lang.lisp
From: Nicolas Edel <nicolas.e...@gmail.com>
Date: Tue, 16 Dec 2008 05:00:34 -0800 (PST)
Local: Tues, Dec 16 2008 8:00 am
Subject: Re: Extracting class slot names
On Dec 16, 12:41 pm, Rainer Joswig <jos...@lisp.de> wrote:

It has the meaning I felt it has but wasn't sure whether I was missing
something or not.
Thanks for the documentation howto ;)

-Nicolas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Nicolas Edel  
View profile  
 More options Dec 16 2008, 8:13 am
Newsgroups: comp.lang.lisp
From: Nicolas Edel <nicolas.e...@gmail.com>
Date: Tue, 16 Dec 2008 05:13:48 -0800 (PST)
Local: Tues, Dec 16 2008 8:13 am
Subject: Re: Extracting class slot names
On Dec 16, 11:36 am, Rainer Joswig <jos...@lisp.de> wrote:

Thanks, I just learned the +, ++ and +++ variables.

-Nicolas


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google