Subject: Re: MrEd weirdness
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 2000/04/15
Newsgroups: comp.lang.scheme
Message-ID: <8d8s2i$2u55$1@fido.engr.sgi.com>
<khathru@my-deja.com> wrote:
+---------------
| > (require-library "graphic.ss" "graphics")
| require-library: collection "graphics" does not have library: "graphic.ss" in:
| "/usr/src/plt/collects/graphics"
| > (require-library "graphics.ss" "graphics")
| 1) The first "require-library" line is typed exactly as specified in the
| helpdesk. Is there a typo in the Helpdesk?
+---------------

Guess so. I see exactly the same thing here, too. Looking in
/usr/local/lib/plt/collects/graphics, there simply is no "graphic.ss".

+---------------
| > (open-graphics)
| > (define v (open-viewport "main" 200 200))
| > ((draw-rectangle v) (make-posn 50 50) 100 100 2)
| 
| find-or-create-pen in pen-list% (color name case): expects argument of type
| <string>; given 2
+---------------

Note that all of the following do work, though:

  ((draw-rectangle v) (make-posn 50 50) 100 100 "blue")
  ((draw-rectangle v) (make-posn 50 50) 100 100 (make-object color% 0 0 255))

  ((draw-line v) (make-posn 50 100) (make-posn 150 100) "red")
  ((draw-line v) (make-posn 50 110) (make-posn 150 110)
				    (make-object color% 255 0 0))

+---------------
| > ((draw-line v) (make-posn 50 100) (make-posn 150 100) 2)
| 
| 2) The 4th argument to the "(eval (draw-rectangle v))" function should be a
| "color" object. According to the documentation, a color object can be an
| integer or something returned from "make-rgb". So... should the first
| (draw-rectangle v) call shown above really fail? I've got some code that uses
| color's like this that used to work.
+---------------

Dunno. Maybe they changed the interface? [Not suprising. There's been a
*lot* of development between v.53 & v.101.] The current online descriptions
of "color%" & "color-database<%>" make no mention of single integer colors:

    <URL:http://www.cs.rice.edu/CS/PLT/packages/doc/mred/node368.htm>
    <URL:http://www.cs.rice.edu/CS/PLT/packages/doc/mred/node375.htm>

Nor does the "Drawing Toolbox Overview":

    <URL:http://www.cs.rice.edu/CS/PLT/packages/doc/mred/node343.htm>


-Rob

-----
Rob Warnock, 41L-955		rpw3@sgi.com
Applied Networking		http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		PP-ASEL-IA
Mountain View, CA  94043