some small troubles

Charles Shehadi cshehadi@panix.com
Sat, 02 Dec 1995 18:47:26 -0400


Hello all...

I'm having some trouble with my MCL/Common Music code...

I'm pretty sure there are some simple solutions to these problems, but =

I don't know enough LISP yet to solve them...


The following method definition is supposed to draw the contents of a =

"tool palette" window for an application I'm writing.  ("tool-palette" =

is a subclass of the MCL class "windoid"). =


**The method doesn't cause an error in MCL 3.0p2:

(defmethod view-draw-contents :before ((tplt tool-palette))
  (let ((pict-hdl (slot-value tplt 'pict-hdl)))
    (when pict-hdl
      (rlet ((rect :rect
                   :topleft #@(0 0)
                   :bottomright #@(49 241)))
        (#_DrawPicture pict-hdl rect)))))


**When I try to evaluate it in Common Music. I get two errors:

I think they involve the following lines of code:

**Error number 1:  =

(#_DrawPicture pict-hdl rect)))))

> Error: File "ccl:interfaces;index;traps.idx" does not exist.
> While executing: CCL::IF-DOES-NOT-EXIST
> Type Command-. to abort.
See the Restarts=8A menu item for further choices.

I have a file called traps.idx in my MCL:Libraries:interfaces;index =

folder.  Can I just copy that file to a location in the Common Music =

folder, or is fixing this problem more involved than that?


**Error number 2:
(rlet ((rect :rect
             :topleft #@(0 0)
             :bottomright #@(49 241)))

> Error: While compiling (VIEW-DRAW-CONTENTS BEFORE (TOOL-PALETTE)) :
>        #1=3D(RECT :RECT :TOPLEFT 0 :BOTTOMRIGHT 15794225) is not a symbol=
 or lambda expression in the form (#1#) .
> Type Command-. to abort.
See the Restarts=8A menu item for further choices.


I'm not sure what to make of this....it works in MCL but not in Common =

Music?  Are some files I should "require" or something like that?


Thanks in advance for any help...

-Charlie