Paste number 88609: macro basics

Paste number 88609: macro basics
Pasted by: salva
When:10 months, 3 weeks ago
Share:Tweet this! | http://paste.lisp.org/+1WDD
Channel:#lisp
Paste contents:
Raw Source | XML | Display As
(defun generate-widget-html(widget)
  (case (type-of widget)
    (border (format t "create borders ~a ~%" (page-name-of widget))
                       )
    (label (format t "create label")

)
    (page  (format t "create page")
;           (generate-page-html widget)
           )
    (page-stack (format t "create page-stack")
                (generate-page-stack-html widget))))



(defmacro generate-page-html(view)
  `(div "generated page " ,(page-name-of view)))


;; the function and the macro seems work well, but if i call
;; the macro from function i get this error, some help please

 (in macroexpansion of (generate-page-html widget))
    (hint: For more precise location, try *BREAK-ON-SIGNALS*.)
    There is no applicable method for the generic function
      #<standard-generic-function page-name-of (1)>
    when called with arguments
      (widget).

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.