From 4c8056245f4724428d2d7615085816e0b275a013 Mon Sep 17 00:00:00 2001 From: jsancho Date: Fri, 31 Dec 2010 16:49:53 +0000 Subject: [PATCH] --- gacela_objects.lisp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gacela_objects.lisp b/gacela_objects.lisp index c3f9ea2..af5cf20 100755 --- a/gacela_objects.lisp +++ b/gacela_objects.lisp @@ -81,9 +81,14 @@ object)) (defmacro make-object (name attr bhv &body look) - `(let ((attr ,(make-object-attributes attr) bhv ,(make-object-behaviour bhv))) - (defun ,name (option) ,@look) - )) + `(let ((attr ,(cond (attr (cons 'list (make-object-attributes attr))))) + (bhv ,(cond (bhv (cons 'list (make-object-behaviour bhv)))))) + (defun ,name (option &rest param) + (case option + (:get-attr attr) + (:set-attr (setq attr @param)) + (:get-bhv bhv) + (:render ,@look))))) (defun make-object-attributes (attr) (cond ((or (null attr) (atom attr)) nil) -- 2.39.2