fixed textarea to not show NIL
authorDrew Crampsie <drewc@tech.coop>
Sat, 29 Oct 2005 00:26:51 +0000 (17:26 -0700)
committerDrew Crampsie <drewc@tech.coop>
Sat, 29 Oct 2005 00:26:51 +0000 (17:26 -0700)
darcs-hash:20051029002651-5417e-19c3ebc7c0534a90b60808cfa4ac09e3c600ef68.gz

src/slot-presentations.lisp

index 8bd517c..19927f9 100644 (file)
 ;;;; ** Textarea Slot Presentation
 
 (defslot-presentation text-slot-presentation ()
 ;;;; ** Textarea Slot Presentation
 
 (defslot-presentation text-slot-presentation ()
-  ((rows :initarg :rows :accessor rows :initform 25)
+  ((rows :initarg :rows :accessor rows :initform 5)
    (columns :initarg :columns :accessor columns :initform 40)
    (escape-html-p :initarg :escape-html-p :accessor escape-html-p :initform nil))
   (:type-name text))
 
 (defmethod present-slot ((slot text-slot-presentation) instance)
    (columns :initarg :columns :accessor columns :initform 40)
    (escape-html-p :initarg :escape-html-p :accessor escape-html-p :initform nil))
   (:type-name text))
 
 (defmethod present-slot ((slot text-slot-presentation) instance)
-  (if (editablep slot)
-      (<ucw:textarea :accessor (presentation-slot-value slot instance)
-                    :rows (rows slot)
-                    :cols (columns slot))
-      (if (escape-html-p slot)
-         (<:as-html (presentation-slot-value slot instance))
-         (<:as-is (presentation-slot-value slot instance)))))
+    (if (editablep slot)
+       (<ucw:textarea
+        :accessor (presentation-slot-value slot instance)
+        :reader (or (presentation-slot-value slot instance)
+                "")
+        :rows (rows slot)
+        :cols (columns slot))
+       (if (escape-html-p slot)
+           (<:as-html (presentation-slot-value slot instance))
+           (<:as-is (presentation-slot-value slot instance))))))
 
 
 (defcomponent mewa-slot-presentation ()
 
 
 (defcomponent mewa-slot-presentation ()