Drop usage of defaction
authorattila.lendvai <attila.lendvai@gmail.com>
Tue, 12 Jun 2007 08:36:46 +0000 (01:36 -0700)
committerattila.lendvai <attila.lendvai@gmail.com>
Tue, 12 Jun 2007 08:36:46 +0000 (01:36 -0700)
darcs-hash:20070612083646-6b9e8-74cc7137432ef60b07bd6cbd52c5b07f1eeec8ea.gz

reddit-example.lisp
src/components/ajax.lisp
src/components/crud.lisp
src/components/range-list.lisp
src/components/search.lisp
src/standard-wrappers.lisp

index 1efa49d..73821bc 100644 (file)
@@ -43,7 +43,7 @@
 
 (defvar *links* (list))
 
-(defaction add-link ((self component))
+(defmethod/cc add-link ((self component))
   (let ((l (call-display (make-instance 'link)
                :type 'editor)))
     (when l (push l *links*))))
index f3a9f83..b7fc38c 100644 (file)
@@ -78,7 +78,7 @@ but here's what i use."
          input-id  "session"  
          (ucw::session.id (ucw::context.session ucw::*context*))))
 
-(defaction on-submit ((l auto-complete))
+(defmethod/cc on-submit ((l auto-complete))
   ())
 
 (defmethod js-on-select ((l auto-complete))
@@ -184,7 +184,7 @@ but here's what i use."
            (<ucw:render-component 
             :component (make-presentation val :type :one-line))))))
          
-(defaction revert-foreign-slot ((slot ajax-foreign-key-slot-presentation))
+(defmethod/cc revert-foreign-slot ((slot ajax-foreign-key-slot-presentation))
   (setf (lol::value (live-search slot)) nil)
   (when (original-value slot)
   (mewa::sync-foreign-instance slot (original-value slot))))
index 6d4ab6c..34203d9 100644 (file)
@@ -1,14 +1,14 @@
 (in-package :lisp-on-lines)
 
-(defaction read-instance ((self component) instance)
+(defmethod/cc read-instance ((self component) instance)
   "View an existing instance"
   (call 'crud-viewer :instance instance))
 
-(defaction update-instance ((self component) instance)
+(defmethod/cc update-instance ((self component) instance)
   "Edit an instance, possibly a newly created one"
   (call 'crud-editor :instance instance))
 
-(defaction create-instance ((self component) class &rest initargs)
+(defmethod/cc create-instance ((self component) class &rest initargs)
   "Create a new instance and edit it."
   (update-instance self (apply #'make-instance class initargs)))
 
@@ -25,7 +25,7 @@
       (display (make-instance 'component) instance
               :layers '(+ as-string)))))
 
-(defaction delete-instance ((self component) instance)
+(defmethod/cc delete-instance ((self component) instance)
   (when  (call 'option-dialog
               :message (format nil "Really Delete ~A" (display-as-string instance))
               :options '((t "Yes, really delete it,")
@@ -208,7 +208,7 @@ note the omitted COMPONENT argument. sugar is all."
 (defcomponent crud-editor (crud validation-mixin)
   ())
 
-(defaction ensure-instance ((self crud-editor))
+(defmethod/cc ensure-instance ((self crud-editor))
   "This one does a little magic, see SYNC-INSTANCE"
   (meta-model::sync-instance (instance self)))
 
@@ -288,7 +288,7 @@ note the omitted COMPONENT argument. sugar is all."
          :action (create-instance object (db-class object))
          (<:as-html "(Create New " (db-class object) ")"))))
 
-(defaction call-crud-summary ((self component) class)
+(defmethod/cc call-crud-summary ((self component) class)
   (call 'crud-summary :class class))
 
 
index bf38ed2..1d07584 100644 (file)
@@ -97,12 +97,12 @@ MAKE-RANGE-LIST-GENERATOR INSTANCE :chunk-size WINDOW-SIZE GENERATOR-ARGS"))
     (setf (range-list.offset self)
           (funcall (range-list.generator self) :offset))))
 
-(defaction scroll ((self range-list) op)
+(defmethod/cc scroll ((self range-list) op)
     (funcall (range-list.generator self) :offset (range-list.offset self))
     (setf (mewa::instances self)
           (range-list.fetch-items self op)))
 
-(defaction scroll-to-page ((self range-list) window-number)
+(defmethod/cc scroll-to-page ((self range-list) window-number)
   (setf (range-list.offset self) window-number)
   (scroll self :current))
 
index 4b4e5e5..2d011c1 100644 (file)
@@ -50,7 +50,7 @@
                      base-classes)))
 
 
-(defaction do-search ((self simple-search))
+(defmethod/cc do-search ((self simple-search))
   (let* ((target (or (slot-value self 'ucw::parent) self))
         (result (call-component 
                  target 
@@ -86,7 +86,7 @@
                 :type :listing 
                 :initargs `(:instances ,r)))))))
 
-(defaction ok ((self simple-search-results) &optional arg)
+(defmethod/cc ok ((self simple-search-results) &optional arg)
   (declare (ignore arg))
   (answer nil))
 
   (make-instance 'mewa::mewa-presentation-search
                     :search-presentation (make-presentation instance :type :search-model)
                     :list-presentation (make-presentation instance :type :listing
-(defaction select-search-table ((self advanced-search))
+(defmethod/cc select-search-table ((self advanced-search))
   (let* ((i (make-instance (search-table self)))
         (p (make-search-presentation i)))
     (embed-component self p)
index bdc975c..f54f1e6 100644 (file)
@@ -31,7 +31,7 @@
         :initarg :action
         :initform nil :special t :accessor link-action)))
 
-(defaction call-action-with-component-and-object ((self component) action-id object)
+(defmethod/cc call-action-with-component-and-object ((self component) action-id object)
   (funcall (ucw::find-action (ucw::context.current-frame *context*) action-id)
           self
           object))