help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Something like an array (list) of a class


From: Decebal
Subject: Re: Something like an array (list) of a class
Date: Mon, 13 Apr 2009 21:44:02 -0700 (PDT)
User-agent: G2/1.0

On 14 apr, 02:52, Barry Margolin <bar...@alum.mit.edu> wrote:
> In article
> <67e696b0-bdf8-45e2-86d6-4a696bb2e...@r37g2000yqn.googlegroups.com>,
> > But there are a few problems:
> > - I would like to have the vector modelineArray readonly. Is this
> > possible?

Is this possible, or do I want to much?


> The syntax of a slot specification is
>
> (slot-name default options...)
>
> In your defstruct, you specified :read-only as the default, so it's not
> being taken as an option name.  Try:
>
> (type nil :read-only t)

That works.


> > - The vector is notfilled with ModeLine objects. When executing:
> >     (aref modelineArray 2)
> > I get:
> >     (new-ModeLine "words" "Display number of words" "W" (quote buffer-
> > count-words2))
> > So I can not do something like:
> >     (ModeLine-type (aref modelineArray 2))
> > What is the good way to fill the vector?
>
> [...] is for literals, it doesn't evaluate its contents.  Use (vector
> ...) instead.

That works also. I am slowly getting there.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]