Is this a bug?

From: Harvey J. Stein <hjstein_at_MATH.HUJI.AC.IL>
Date: Sun, 25 Jun 1995 10:47:27 +0300

Andrew Dorrell writes:
> STkers,
>
> I have been trying to write a class which inherits from the Canvas class for
> doing some simple plotting. I need to initialise the canvas then make the
> axis. Parameters for making the axis are defined within the new class:
>
> (define-class <Plot> (<Canvas>)
> ((xaxis :accessor xaxis)
> (yaxis :accessor yaxis)
> (border :accessor border
> :initform 10
> :init-keyword :border)
> )
> )
>
> The problem is in intitialising:
>
> (define-method initialize ((self <Plot>) initargs)
> (next-method)
> (let* ((xorigin (slot-ref self 'border))
> (yorigin (/ (slot-ref self 'height) 2))
> (xmin (slot-ref self 'border))
> (xmax (- (slot-ref self 'width) (slot-ref self 'border)))
> (ymax (- (slot-ref self 'height) (slot-ref self 'border)))
> (ymin (slot-ref 'self 'border)))
> (slot-set! self 'xaxis
> (make <Axis> :parent self
> :coords (list xmin yorigin xmax yorigin)))
> (slot-set! self 'yaxis
> (make <Axis> :parent self
> :coords (list xorigin ymin xorigin ymax)))
> )
> )
>

Your problem is on the line which sets ymin. You have a quote in
front of the self. I found it by cutting out pieces of the initialize
method until I found the piece causing the problem.

Good luck,

Dr. Harvey J. Stein
Berger Financial Research
hjstein_at_math.huji.ac.il
Received on Sun Jun 25 1995 - 09:58:48 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 21 2014 - 19:38:59 CEST