[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Subject: DOCBOOK-APPS: Literals and strings?!?
Sorry to bug you all with something so simple, but I just do not get Lisp and I'm starting to think I never will... I'm trying to replace a section of dbnavig.dsl that generates the following table row (content edited for readibility): <TR> <TD WIDTH="33%" ALIGN="left" VALIGN="top"> <A HREF="index.php" ACCESSKEY="P">Prev</A> </TD> <TD WIDTH="34%" ALIGN="center" VALIGN="top"> <A HREF="index.php" ACCESSKEY="H" >Home</A> </TD> <TD WIDTH="33%" ALIGN="right" VALIGN="top"> <A HREF="x36.php" ACCESSKEY="N" >Next</A> </TD> </TR> and instead have it generate: <script> function prev() { document.location.href='index.php'; } function next() { document.location.href='x36.php'; } </script> To do so, I've blindly replaced that code with: (r1-sosofo (make element gi: "script" (make sequence (literal "function prev() { document.location.href='") (href-to prev) (literal "'; } ") (literal "function next() { document.location.href='") (href-to next) (literal "'; }")))) This is almost certainly the hard way to go about this, but I know I'm very close. The problem is those blasted (href-to prev) and (href-to next) statements. They return strings, which makes the make sequence command unhappy (ERROR: this context requires a sosofo). Likewise, if I try to do this with just strings: (r1-sosofo (make element gi: "script" (literal (string-append "function prev() { document.location.href='" (href-to prev) "'; } " "function next() { document.location.href='" (href-to next) "'; }")))) Then I get an even more peculiar error in an unexpected place (I would assume a calling routine): jade:HTML.dsl\dbhtml.dsl:28:23:E: 1st argument for primitive "number->string" of wrong type: "#f" not a number So what the heck is the correct way to append the result of (href-to next) to a bunch of literal strings?!? Thanks a ton, Gre7g. ================================================================= Gre7g Luterman gre7g@wolfhome.com http://www.templeofluna.com/ Stay informed: http://www.templeofluna.com/keeper/mailinglist.htm I want to be the master of time and space, a living god, ...and then I'd like to visit Europe.
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]
Powered by eList eXpress LLC