;;;; ;;;; m e t h o d - e d i t o r . s t k l o s -- Editor for STklos methods and gf ;;;; ;;;; Copyright © 1998 Erick Gallesio - I3S-CNRS/ESSI ;;;; ;;;; Permission to use, copy, and/or distribute this software and its ;;;; documentation for any purpose and without fee is hereby granted, provided ;;;; that both the above copyright notice and this permission notice appear in ;;;; all copies and derived works. Fees for distribution or use of this ;;;; software or derived works may only be charged with express written ;;;; permission of the copyright holder. ;;;; This software is provided ``as is'' without express or implied warranty. ;;;; ;;;; $Id: method-editor.stklos 1.1 Sat, 26 Sep 1998 19:19:52 +0200 eg $ ;;;; ;;;; Author: Erick Gallesio [eg@unice.fr] ;;;; Creation date: 24-Sep-1998 16:32 ;;;; Last file update: 26-Sep-1998 17:28 (require "Tk-classes") ;;; ;;; Utilities ;;; (define (method->list m) (let ((gf (method-generic-function m))) (if gf (let ((proc (uncode (procedure-body (method-procedure m)))) (spec (map* class-name (method-specializers m)))) `(define-method ,(generic-function-name gf) ,(map* list (cdadr proc) spec) ,@(cddr proc))) ;; Method with no associated method '()))) ;============================================================================= ; ; m e t h o d - e d i t o r ; ;============================================================================= (define-method method-editor ((m ) parent) (define (make-buttons parent edit env) (let* ((f (make :parent parent :border-width 2 :relief "ridge")) (e (make