class conflict

From: Jen Mankoff <jmankoff_at_cs.oberlin.edu>
Date: Sat, 29 Apr 1995 16:00:55 -0400

There seems to be a naming conflict between two of the stk object
classes:

a <Text> object can be of type <Tk-canvas-figure>. In this case, it is
a canvas item. Or a <Text> object can be a widget of its own.

As far as I can tell, the object that is loaded last is the one that
is created with a (make <Text> ...) command. If it's ok to overload
class defenitions, and I'm just missing something, please tell
me. Otherwise, I'd suggest renaming one of the two classes in the next
distribution.

thanks

        -jen

----------------------

the canvas figure:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; <Text> class definition
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-class <Text> (<Tk-canvas-figure>)
  ((anchor :accessor anchor :init-keyword :anchor :allocation :tk-virtual)
   (fill :accessor fill :init-keyword :fill :allocation :tk-virtual)
   (justify :accessor justify :init-keyword :justify :allocation :tk-virtual)
   (font :accessor font :init-keyword :font :allocation :tk-virtual)
   (stipple :accessor stipple :init-keyword :stipple :allocation :tk-virtual)
   (text :accessor text-of :init-keyword :text :allocation :tk-virtual)
   (width :accessor width :init-keyword :width :allocation :tk-virtual)))


the widget:

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;
;;;; <Text> class definition
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define-class <Text> (<Tk-simple-widget> <Tk-sizeable> <Tk-editable>
                      <Tk-selectable> <Tk-text-selectable>)
  ((state :initarg :state
                     :accessor state
                     :allocation :tk-virtual)
   (y-scroll-command :init-keyword :y-scroll-command
                     :accessor y-scroll-command
                     :tk-name yscrollcommand
                     :allocation :tk-virtual)
   (wrap :initarg :wrap
                     :accessor wrap
                     :allocation :tk-virtual)
   (set-grid :accessor set-grid
                     :init-keyword :set-grid
                     :allocation :tk-virtual
                     :tk-name setgrid)
   (pad-x :accessor pad-x
                     :init-keyword :pad-x
                     :allocation :tk-virtual
                     :tk-name padx)
   (pad-y :accessor pad-y
                     :init-keyword :pad-y
                     :allocation :tk-virtual
                     :tk-name pady)
   (value :accessor value
                     :init-keyword :value
                     :allocation :virtual
                     :slot-ref (lambda (o)
                                     ((slot-ref o 'Id) 'get "1.0" "end"))
                     :slot-set! (lambda (o v)
                                     ((slot-ref o 'Id) 'delete "1.0" "end")
                                     ((slot-ref o 'Id) 'insert "1.0" v)))
   ;; The hash-table of associated tags
   (tags :initform (make-hash-table))))
Received on Sat Apr 29 1995 - 22:02:28 CEST

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