[bknr-cvs] ksprotte changed trunk/projects/bos/m2/poi.lisp
BKNR Commits
bknr at bknr.net
Wed Sep 3 14:51:57 UTC 2008
Revision: 3780
Author: ksprotte
URL: http://bknr.net/trac/changeset/3780
more defensive coding in MAKE-POI-JAVASCRIPT to avoid generating
invalid javascript (which is hard to debug)
U trunk/projects/bos/m2/poi.lisp
Modified: trunk/projects/bos/m2/poi.lisp
===================================================================
--- trunk/projects/bos/m2/poi.lisp 2008-09-03 12:56:00 UTC (rev 3779)
+++ trunk/projects/bos/m2/poi.lisp 2008-09-03 14:51:57 UTC (rev 3780)
@@ -110,7 +110,8 @@
:documentation "liste aller poi-medien, wie poi-image, poi-airal ...")))
-(defmethod convert-slot-value-while-restoring ((object poi) (slot-name (eql 'published)) published)
+(defmethod convert-slot-value-while-restoring ((object poi) (slot-name (eql 'published))
+ published)
(setf (slot-value object 'published-web) published))
(deftransaction make-poi (name &rest rest &key area language title subtitle description)
@@ -229,7 +230,13 @@
(when (poi-panoramas poi)
(format t "poi.panoramas = [ ~{~D~^, ~} ];~%" (mapcar #'store-object-id (poi-panoramas poi))))
(when (poi-movies poi)
- (format t "poi.movies = [ ~{~S~^, ~} ];~%" (mapcar #'poi-movie-url (poi-movies poi))))
+ (format t "poi.movies = [ ~{~S~^, ~} ];~%"
+ (mapcar #'(lambda (movie)
+ (assert (stringp (poi-movie-url movie)) nil
+ "POI-MOVIE-URL of ~S is ~S, but should be a string"
+ movie (poi-movie-url movie))
+ (poi-movie-url movie))
+ (poi-movies poi))))
(loop for slot-name in '(title subtitle description)
for javascript-name in '("imageueberschrift" "imageuntertitel" "imagetext")
for slot-values = (mapcar (lambda (image)
More information about the Bknr-cvs
mailing list