From: jsancho Date: Fri, 31 Dec 2010 16:49:53 +0000 (+0000) Subject: (no commit message) X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=4c8056245f4724428d2d7615085816e0b275a013;p=gacela.git --- 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)