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

various questions



     First, my thanks to those who answered my message of a few weeks ago
without making me feel stupid just because I have had very little experience
with Lisp, CLOS, MCL, and the Macintosh (manuals are my friends ... I think).
Forgive me for taking up bandwidth if the following questions are as simple-
minded as the last one, but I was just wondering.  BTW, I am running a vanilla
Mac II and MCL 2.0b1p3.

1) An attempt at using the declaim macro in the following way failed:

   (declaim (type type1 var1) (type type2 var2) ... )

   When the buffer was evaluated, this was the response:

   > Error: Too many arguments in form (QUOTE (TYPE TYPE1 VAR1) ... ) .
   > While executing: CCL::VERIFY-ARG-COUNT

   Using macroexpand on this form revealed that the declaim expands to:

   (eval-when (:load-toplevel :execute :compile-toplevel)
        (proclaim (quote (type type1 var1) (type2 var2) ... )))

   which is obviously in error.  As far as I can tell, I wrote the declaim in
   the format specified by CLtL2.  Did I do something wrong?

2) I am (still) writing an application which will graphically represent a
   directed graph.  The user will be allowed to drag nodes around for esthetic
   as well as practical purposes.  The problem is that occasionally an edge
   will be drawn across an intervening node.  I would like to guarantee that
   an edge will never be drawn across the face of a node (which I have
   implemented as a simple-view with a few extra slots).  Chopping the region
   corresponding to each node out of the window's cliprgn didn't work.  Edges
   stop being drawn when they exit the cliprgn, but don't continue on the other
   side.  Is there some approach which will allow this behavior?

3) Is the view-alist slot used by the system at all or is it wide open for use
   by programs (or both)?  What are the parameters for view-get and view-put?

4) The nick-name feature for views looks interesting, but I am confused on a
   few points.  The documentation says it is for views, but it appears to work
   on simple-views as well.  Also, set-view-nick-name is not bound.  It is easy
   enough to define, just

   (defmethod set-view-nick-name ((sv simple-view) new-name)
	(setf (view-nick-name sv) new-name))

   but the documentation makes it sound like it is already defined.

Thanks in advance for any answers.  Please excuse my long-windedness, but
sometimes you just have to know.

Jerry James
jamesj@bert.cs.byu.edu