[Bese-devel] UCW: random annoyances
Brian Downing
bdowning at lavos.net
Fri Apr 29 00:33:35 UTC 2005
Hi. I've recently been learning UCW by putting together a simple game
(occasionally up at http://www.lavos.net:2501/triple-triad/index.ucw),
and have been incredibly impressed. However, I've noticed some things
that I'm not quite sure about. I'm using a recent checkout of ucw-dev.
First, I initially tried to have an entry point other than "index.ucw",
however all links seemed to be made to go to that unconditionally, so I
couldn't click on anything. Easily fixed, but I don't really want to
have an index.ucw entry point if possible.
The :COMPONENT and :BACKTRACK initargs to component classes don't seem
to be changeable upon reevaluation on my platform (SBCL 0.9.0). This is
quite annoying while in development, as I have to unintern the class
name and recompile the entire file, or, in the case of :BACKTRACK, quit
and restart UCW entirely for some reason. Is there a hard technical
reason why this is the case, or is this a bug?
Finally, this component definition:
(defcomponent triple-triad-window (simple-window-component)
((body :component setup :accessor body :backtrack t))
(:default-initargs
:title "Triple Triad"
:stylesheet "stylesheet.css"))
fails with a "Slot BODY is unbound" error. I assume this is because
it's trying to backtrack it before it is populated with the component.
Adding an :INITFORM NIL in there fixes it, but that seems quite
non-intuitive next to the :COMPONENT initarg. Would it make sense for
the backtracking machinery to check whether the slot is bound before
trying to save it?
Other than that, the backtracking machinery is beautiful - just throwing
:BACKTRACK #'COPY-LIST on my deck slots made the interface completely
compatible with the back button and browser cloning without me losing my
mind keeping the state on the browser.
Given enough time I may try to fix some of these on my own, but for
right now the code base is pretty confusing to me, and I figured I'd at
least make them known.
Finally, I just want to put this here, since this is just a ridiculously
simple expression of something that would be hellish with traditional
web programming:
(<ucw:a :action (rotatef (deck (p1-picker app)) (deck (p2-picker app)))
"[<- swap ->]")
Thanks for UCW!
-bcd
--
*** Brian Downing <bdowning at lavos dot net>
More information about the bese-devel
mailing list