Commit 27a2d98b authored by Dave Cooper's avatar Dave Cooper
Browse files

started adding defgenerics to macroexpanded code. Updated Manual. Removed...

started adding defgenerics to macroexpanded code. Updated Manual. Removed debug messages from gdlAjax.
parent 9ba7d68f
Clean startup on Ubuntu Linux (replace apt-get with the package manager
on your local Linux or MacOS):
==============================
$ == Linux shell prompt
* == Common Lisp shell prompt
M- or C- == Meta or Control command inside emacs
# == comment or manual action
$ cd
$ sudo apt-get install git
$ git clone git://gitub.com/genworks/Genworks-GDL.git
$ sudo apt-get install emacs
$ sudo apt-get install sbcl
$ sudo apt-get install curl
$ mkdir ~/cl
$ cd ~/cl
$ curl -O http://beta.quicklisp.org/quicklisp.lisp
$ cd ..
$ sbcl --load cl/quicklisp.lisp
* (quicklisp-quickstart:install)
* (ql:quickload :quicklisp-slime-helper)
# [Edit your .emacs or other emacs startup file as indicated]
* (quit)
$ emacs
M-x slime
* (load "~/quicklisp/setup")
* (pushnew (make-pathname :name nil :type nil
:defaults "~/Genworks-GDL/")
ql:*local-project-directories*)
* (ql:register-local-projects)
* (ql:quickload :gdl-all)
* (ql:quickload :gdl-surf) ;; optional -- provides VRML and X3DOM output - under development!
# [In web browser: visit: http://localhost:9000/tasty]
# [In field for package::class, enter robot:assembly]
# [click pencil icon next to Robot (shows up on mouseover]
......@@ -33,9 +33,18 @@
:objects
((twenty-four :type 'assembly-24
((wind :type 'wind-demo-launcher)
(twenty-four :type 'assembly-24
:pass-down (respondent))))
(define-object wind-demo-launcher (base-site-sheet)
:computed-slots
((right-section-inner-html
(with-cl-who-string ()
"Please click "
((:a :href "/demo-1") "Here")
" to visit the Wind Turbine demo."))))
......@@ -52,7 +52,9 @@ high-end commercial components.")
(:p (:strong "Genworks")
" is the first-level vendor for GenDL. We work with a network of General Resellers and Value-added Resellers to provide
you with customized services and end-user applications, depending on your precise requirements."))
you with customized services and end-user applications, depending on your precise requirements.")
(:p ((:iframe :idth "560" :height "315" :src "http://www.youtube.com/embed/yTcxNaBKTOc?hd=1" frameborder "0" :allowfullscreen "allowfullscreen"))))
(:h3 "Company Profile")
((:div :class "profile")
......
......@@ -58,7 +58,12 @@
(main-sheet-body
(with-cl-who-string ()
(:div :id "wrapper"
(:div :id "header"(:h1 "Wind Turbine Geometry Demo"))
((:div :id "header")
(:center (:h1 "Wind Turbine Geometry Demo")
((:a :href "https://github.com/genworks/Genworks-GDL/tree/master/demos/wind-demo-1/source" :target "_sources")
(:i "source code"))))
(:div :id "left"
(:div :id "logo"
(:h1 "KE-Works S.R.L. & Genworks International")
......@@ -121,7 +126,9 @@
(define-object general-inputs (sheet-section)
:computed-slots
((main-view (with-cl-who-string ()
((max-blades 12)
(main-view (with-cl-who-string ()
((:table :class "input_area")
((:col :width "90%")
(:tr (:td) (:td))
......@@ -143,6 +150,11 @@
:default 3
:prompt nil
:size 1
:validation-function #'(lambda(value) (if (and (integerp value)
(<= 1 value (the max-blades)))
t
(list :validated-value (the-child default) :error "The value must be an integer between 1 and 12, inclusive.")))
:allow-invalid? nil
:ajax-submit-on-change? t)
(hub-hight :type 'text-form-control
......@@ -322,10 +334,11 @@
:computed-slots
((main-view (with-cl-who-string ()
(str (the component-display-control html-string))
#+nil
(:h3 (str (if (eql (the component-display-control value) :rotor-assembly)
"Blade concepts"
"" )))
#+nil
(str (if (eql (the component-display-control value) :rotor-assembly)
(the blade-concepts html-string) ""))
)))
......@@ -345,14 +358,14 @@
(blade-concepts :type 'menu-form-control
:choice-plist (list :classic-blade "Classic blade"
:blade-with-flaps "Blade with flaps"
:blade-with-morfin-tip "Blade with morfin tip"
:blade-with-m-tip-flaps "Blade with M-tip-flaps")
:default :classic-blade
:size 1
:prompt nil
:ajax-submit-on-change? t)
:choice-plist (list :classic-blade "Classic blade"
:blade-with-flaps "Blade with flaps"
:blade-with-morfin-tip "Blade with morfin tip"
:blade-with-m-tip-flaps "Blade with M-tip-flaps")
:default :classic-blade
:size 1
:prompt nil
:ajax-submit-on-change? t)
......
......@@ -218,9 +218,8 @@
(add-hook 'slime-repl-mode-hook 'remove-dos-eol)
(add-to-list 'auto-mode-alist '("\\.gdl\\'" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.gendl\\'" . lisp-mode))
(add-to-list 'auto-mode-alist '("\\.gendl\\'" . lisp-mode))))
))
;;
;; To switch to slime buffer shortcuts
......
......@@ -2,11 +2,16 @@
;;
;; FLAG -- this will be more useful as a view-scale-independent mixin
;;
(define-object visible-coordinate-system (base-coordinate-system)
:input-slots ((length 10) (width 10) (height 10)
(show-axes? t :settable)
(show-face-labels? t :settable)
(grid-size 10)
(grid-pitch (/ (the length) (the grid-size))))
......@@ -15,7 +20,9 @@
((box :type 'box
:display-controls (list :color :orange :transparency 0.8))
(x-pointer :type 'axis-pointer
:hidden? (not (the show-axes?))
:label "X"
:display-controls (list :color :red)
:length (half (the length))
......@@ -31,6 +38,7 @@
(y-pointer :type 'axis-pointer
:hidden? (not (the show-axes?))
:label "Y"
:display-controls (list :color :green)
:length (half (the length))
......@@ -46,24 +54,28 @@
(z-pointer :type 'axis-pointer
:hidden? (not (the show-axes?))
:label "Z"
:display-controls (list :color :blue)
:length (half (the length))
:orientation (alignment :front (the (face-normal-vector :top))))
(front-label :type 'general-note
:hidden? (not (the show-face-labels?))
:center (the (face-center :front))
:orientation (alignment :top (the (face-normal-vector :front)))
:character-size 3
:strings "Front")
(rear-label :type 'general-note
:center (the (face-center :rear))
:orientation (alignment :top (the (face-normal-vector :rear)))
:character-size 3
:strings "Rear")
:hidden? (not (the show-face-labels?))
:center (the (face-center :rear))
:orientation (alignment :top (the (face-normal-vector :rear)))
:character-size 3
:strings "Rear")
(right-label :type 'general-note
:hidden? (not (the show-face-labels?))
:center (the (face-center :right))
:orientation (alignment :top (the (face-normal-vector :right))
:rear (the (face-normal-vector :top)))
......@@ -71,26 +83,27 @@
:strings "Right")
(left-label :type 'general-note
:center (the (face-center :left))
:orientation (alignment :top (the (face-normal-vector :left))
:rear (the (face-normal-vector :top)))
:character-size 3
:strings "Left")
:hidden? (not (the show-face-labels?))
:center (the (face-center :left))
:orientation (alignment :top (the (face-normal-vector :left))
:rear (the (face-normal-vector :top)))
:character-size 3
:strings "Left")
(top-label :type 'general-note
:center (the (face-center :top))
:orientation (alignment :top (the (face-normal-vector :top)))
:character-size 3
:strings "Top")
:hidden? (not (the show-face-labels?))
:center (the (face-center :top))
:orientation (alignment :top (the (face-normal-vector :top)))
:character-size 3
:strings "Top")
(bottom-label :type 'general-note
:center (the (face-center :bottom))
:orientation (alignment :top (the (face-normal-vector :bottom)))
:character-size 3
:strings "Bottom")
:hidden? (not (the show-face-labels?))
:center (the (face-center :bottom))
:orientation (alignment :top (the (face-normal-vector :bottom)))
:character-size 3
:strings "Bottom")))
))
(define-object axis-pointer (cylinder)
......
......@@ -194,10 +194,10 @@
\newlabel{fig:coord-sys-top}{{7.3}{45}{Coordinate System in Top View\relax }{figure.7.3}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {7.4}{\ignorespaces Coordinate System with Symbolically Labeled Faces}}{45}{figure.7.4}}
\newlabel{fig:coord-sys-labeled-faces}{{7.4}{45}{Coordinate System with Symbolically Labeled Faces\relax }{figure.7.4}{}}
\@writefile{toc}{\contentsline {chapter}{\numberline {8}Custom User Interfaces in GenDL}{47}{chapter.8}}
\@writefile{toc}{\contentsline {chapter}{\numberline {8}Custom User Interfaces in Gendl}{47}{chapter.8}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
\newlabel{chap:customuserinterfacesingendl}{{8}{47}{Custom User Interfaces in GenDL\relax }{chapter.8}{}}
\newlabel{chap:customuserinterfacesingendl}{{8}{47}{Custom User Interfaces in Gendl\relax }{chapter.8}{}}
\@writefile{toc}{\contentsline {section}{\numberline {8.1}Package and Environment for Web Development}{47}{section.8.1}}
\newlabel{sec:packageandenvironmentforwebdevelopment}{{8.1}{47}{Package and Environment for Web Development\relax }{section.8.1}{}}
\@writefile{toc}{\contentsline {section}{\numberline {8.2}Traditional Web Pages and Applications}{47}{section.8.2}}
......@@ -212,8 +212,8 @@
\newlabel{fig:gwl-1-image}{{8.3}{49}{Simple Static Page Example\relax }{figure.8.3}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.4}{\ignorespaces Mixing Static HTML and Dynamic Content}}{50}{figure.8.4}}
\newlabel{fig:gwl-2}{{8.4}{50}{Mixing Static HTML and Dynamic Content\relax }{figure.8.4}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.2.2}A Simple Dynamic Page which Mixes HTML and Common Lisp/GenDL}{50}{subsection.8.2.2}}
\newlabel{subsec:asimpledynamicpagewhichmixeshtmlandcommonlisp/gendl}{{8.2.2}{50}{A Simple Dynamic Page which Mixes HTML and Common Lisp/GenDL\relax }{subsection.8.2.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.2.2}A Simple Dynamic Page which Mixes HTML and Common Lisp/Gendl}{50}{subsection.8.2.2}}
\newlabel{subsec:asimpledynamicpagewhichmixeshtmlandcommonlisp/gendl}{{8.2.2}{50}{A Simple Dynamic Page which Mixes HTML and Common Lisp/Gendl\relax }{subsection.8.2.2}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.2.3}Linking to Multiple Pages}{50}{subsection.8.2.3}}
\newlabel{subsec:linkingtomultiplepages}{{8.2.3}{50}{Linking to Multiple Pages\relax }{subsection.8.2.3}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.5}{\ignorespaces Mixing Static HTML and Dynamic Content}}{51}{figure.8.5}}
......@@ -222,30 +222,30 @@
\newlabel{subsec:formcontrolsandfillout-forms}{{8.2.4}{51}{Form Controls and Fillout-Forms\relax }{subsection.8.2.4}{}}
\@writefile{toc}{\contentsline {subsubsection}{Form Controls}{51}{section*.9}}
\newlabel{subsubsec:formcontrols}{{8.2.4}{51}{Form Controls\relax }{section*.9}{}}
\@writefile{toc}{\contentsline {subsubsection}{Fillout Forms}{51}{section*.10}}
\newlabel{subsubsec:filloutforms}{{8.2.4}{51}{Fillout Forms\relax }{section*.10}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.6}{\ignorespaces Linking to Multiple Pages}}{52}{figure.8.6}}
\newlabel{fig:gwl-3}{{8.6}{52}{Linking to Multiple Pages\relax }{figure.8.6}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.7}{\ignorespaces Linking to Multiple Pages}}{52}{figure.8.7}}
\newlabel{fig:gwl-3a}{{8.7}{52}{Linking to Multiple Pages\relax }{figure.8.7}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.8}{\ignorespaces Linking to Multiple Pages}}{53}{figure.8.8}}
\newlabel{fig:gwl-3-image}{{8.8}{53}{Linking to Multiple Pages\relax }{figure.8.8}{}}
\@writefile{toc}{\contentsline {section}{\numberline {8.3}Partial Page Updates with gdlAjax}{53}{section.8.3}}
\newlabel{sec:partialpageupdateswithgdlajax}{{8.3}{53}{Partial Page Updates with gdlAjax\relax }{section.8.3}{}}
\@writefile{toc}{\contentsline {subsubsection}{Fillout Forms}{53}{section*.10}}
\newlabel{subsubsec:filloutforms}{{8.2.4}{53}{Fillout Forms\relax }{section*.10}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.9}{\ignorespaces Form Controls and Fillout Forms}}{54}{figure.8.9}}
\newlabel{fig:gwl-3b}{{8.9}{54}{Form Controls and Fillout Forms\relax }{figure.8.9}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.10}{\ignorespaces Form Controls and Fillout Forms}}{55}{figure.8.10}}
\newlabel{fig:gwl-3b-image}{{8.10}{55}{Form Controls and Fillout Forms\relax }{figure.8.10}{}}
\@writefile{toc}{\contentsline {section}{\numberline {8.3}Partial Page Updates with gdlAjax}{55}{section.8.3}}
\newlabel{sec:partialpageupdateswithgdlajax}{{8.3}{55}{Partial Page Updates with gdlAjax\relax }{section.8.3}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.1}Steps to Create a gdlAjax Application}{55}{subsection.8.3.1}}
\newlabel{subsec:stepstocreateagdlajaxapplication}{{8.3.1}{55}{Steps to Create a gdlAjax Application\relax }{subsection.8.3.1}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.11}{\ignorespaces Partial Page Updates with GdlAjax}}{56}{figure.8.11}}
\newlabel{fig:gwl-4}{{8.11}{56}{Partial Page Updates with GdlAjax\relax }{figure.8.11}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Including Graphics}{57}{subsection.8.3.2}}
\newlabel{subsec:includinggraphics}{{8.3.2}{57}{Including Graphics\relax }{subsection.8.3.2}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.12}{\ignorespaces Including Graphics in a Web Page}}{58}{figure.8.12}}
\newlabel{fig:gwl-5}{{8.12}{58}{Including Graphics in a Web Page\relax }{figure.8.12}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.13}{\ignorespaces Including Graphics}}{59}{figure.8.13}}
\newlabel{fig:gwl-5-image}{{8.13}{59}{Including Graphics\relax }{figure.8.13}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.11}{\ignorespaces Partial Page Updates with GdlAjax}}{57}{figure.8.11}}
\newlabel{fig:gwl-4}{{8.11}{57}{Partial Page Updates with GdlAjax\relax }{figure.8.11}{}}
\@writefile{toc}{\contentsline {subsection}{\numberline {8.3.2}Including Graphics}{58}{subsection.8.3.2}}
\newlabel{subsec:includinggraphics}{{8.3.2}{58}{Including Graphics\relax }{subsection.8.3.2}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.12}{\ignorespaces Including Graphics in a Web Page}}{59}{figure.8.12}}
\newlabel{fig:gwl-5}{{8.12}{59}{Including Graphics in a Web Page\relax }{figure.8.12}{}}
\@writefile{lof}{\contentsline {figure}{\numberline {8.13}{\ignorespaces Including Graphics}}{60}{figure.8.13}}
\newlabel{fig:gwl-5-image}{{8.13}{60}{Including Graphics\relax }{figure.8.13}{}}
\@writefile{toc}{\contentsline {chapter}{\numberline {9}More Common Lisp for Gendl}{61}{chapter.9}}
\@writefile{lof}{\addvspace {10\p@ }}
\@writefile{lot}{\addvspace {10\p@ }}
......
......@@ -35,3 +35,5 @@
\indexentry{sequences|hyperpage}{33}
\indexentry{object sequences|hyperpage}{33}
\indexentry{:size|hyperpage}{33}
\indexentry{AJAX|hyperpage}{55}
\indexentry{gdl-ajax-call|hyperpage}{56}
This is makeindex, version 2.15 [TeX Live 2011] (kpathsea + Thai support).
Scanning input file tutorial.idx....done (37 entries accepted, 0 rejected).
Sorting entries....done (208 comparisons).
Generating output file tutorial.ind....done (81 lines written, 0 warnings).
This is makeindex, version 2.15 [TeX Live 2012] (kpathsea + Thai support).
Scanning input file tutorial.idx....done (39 entries accepted, 0 rejected).
Sorting entries....done (211 comparisons).
Generating output file tutorial.ind....done (86 lines written, 0 warnings).
Output written in tutorial.ind.
Transcript written in tutorial.ilg.
......@@ -5,6 +5,10 @@
\indexspace
\item AJAX, \hyperpage{55}
\indexspace
\item Basic Lisp Techniques, \hyperpage{2}
\indexspace
......@@ -29,6 +33,7 @@
\indexspace
\item gdl-ajax-call, \hyperpage{56}
\item gdl-user(1): , \hyperpage{9}
\item Genworks Gendl Console, \hyperpage{7}
......
This diff is collapsed.
......@@ -53,11 +53,11 @@
\BOOKMARK [2][-]{subsection.6.0.2}{View Frames}{subsection.6.0.1}% 53
\BOOKMARK [0][-]{chapter.7}{Working with Geometry in Gendl}{}% 54
\BOOKMARK [1][-]{section.7.1}{The Default Coordinate System in Gendl}{chapter.7}% 55
\BOOKMARK [0][-]{chapter.8}{Custom User Interfaces in GenDL}{}% 56
\BOOKMARK [0][-]{chapter.8}{Custom User Interfaces in Gendl}{}% 56
\BOOKMARK [1][-]{section.8.1}{Package and Environment for Web Development}{chapter.8}% 57
\BOOKMARK [1][-]{section.8.2}{Traditional Web Pages and Applications}{chapter.8}% 58
\BOOKMARK [2][-]{subsection.8.2.1}{A Simple Static Page Example}{section.8.2}% 59
\BOOKMARK [2][-]{subsection.8.2.2}{A Simple Dynamic Page which Mixes HTML and Common Lisp/GenDL}{section.8.2}% 60
\BOOKMARK [2][-]{subsection.8.2.2}{A Simple Dynamic Page which Mixes HTML and Common Lisp/Gendl}{section.8.2}% 60
\BOOKMARK [2][-]{subsection.8.2.3}{Linking to Multiple Pages}{section.8.2}% 61
\BOOKMARK [2][-]{subsection.8.2.4}{Form Controls and Fillout-Forms}{section.8.2}% 62
\BOOKMARK [1][-]{section.8.3}{Partial Page Updates with gdlAjax}{chapter.8}% 63
......
......@@ -2443,19 +2443,19 @@ Figure
\chapter{Custom User Interfaces in GenDL}
\chapter{Custom User Interfaces in Gendl}
\label{chap:customuserinterfacesingendl}
One of the strengths of GenDL is the ability to create custom
web-based user interfaces. GenDL contains a built-in web server and
supports the creation of generative \emph{web-based} user interfaces\footnote{GenDL does not contain support for native desktop
One of the strengths of Gendl is the ability to create custom
web-based user interfaces. Gendl contains a built-in web server and
supports the creation of generative \emph{web-based} user interfaces\footnote{Gendl does not contain support for native desktop
GUI applications. Although the host Common Lisp
environment (e.g. Allegro CL or LispWorks) may contain a GUI builder
and Integrated Development Environment, and you are free to use these,
GenDL does not provide specific support for them.}. Using the same \texttt{define-object} syntax which you have already learned, you can define web
Gendl does not provide specific support for them.}. Using the same \texttt{define-object} syntax which you have already learned, you can define web
pages, sections of web pages, and \emph{form control} elements such as type-in fields, checkboxes, and choice
lists. Using this capability does require a basic working knowledge of
the HTML language\footnote{We will not cover HTML in this manual, but
......@@ -2468,7 +2468,7 @@ can also be used, as with any standard web application.
With the primitive objects and functions in its \texttt{:gwl} package, GenDL supports both the traditional ``Web 1.0''
With the primitive objects and functions in its \texttt{:gwl} package, Gendl supports both the traditional ``Web 1.0''
interfaces (with fillout forms, page submittal, and complete page
refresh) as well as so-called ``Web 2.0'' interaction with AJAX.
......@@ -2482,7 +2482,7 @@ refresh) as well as so-called ``Web 2.0'' interaction with AJAX.
Similarly to \texttt{gdl:define-package}, you can use \texttt{gwl:define-package} in order to create a working package which has
access to the symbols you will need for building a web application (in
addition to all the other GenDL symbols).
addition to all the other Gendl symbols).
......@@ -2492,8 +2492,8 @@ work. For real projects, you should define your own package using \texttt{gwl:de
The acronym ``GWL'' stands for Generative Web Language, which is not
actually a separate language from GenDL itself, but rather a set of
primitive objects and functions available with GenDL for building web
actually a separate language from Gendl itself, but rather a set of
primitive objects and functions available with Gendl for building web
applications. The YADD reference documentation for package
``Generative Web Language'' provides detailed specifications for all
the primitive objects and functions.
......@@ -2506,26 +2506,26 @@ the primitive objects and functions.
To make a GenDL object presentable as a web page, the following two
To make a Gendl object presentable as a web page, the following two
steps are needed:
\begin{enumerate}
\item Mix \texttt{base-html-sheet} into the object definition.
\item define a GenDL function called \texttt{main-sheet} within the object definition.
\item define a Gendl function called \texttt{main-sheet} within the object definition.
\end{enumerate}
The \texttt{main-sheet} function should return valid
HTML for the page. The easiest way to produce HTML is with the use of
an HTML generating library, such as \href{http://weitz.de/cl-who}{CL-WHO} or \href{http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html}{HTMLGen}, both of which are built into GenDL.
an HTML generating library, such as \href{http://weitz.de/cl-who}{CL-WHO} or \href{http://www.franz.com/support/documentation/current/doc/aserve/htmlgen.html}{HTMLGen}, both of which are built into Gendl.
For our examples we will use cl-who, which is currently the
standard default HTML generating library used internally by
GenDL. Here we will make note of the major features of cl-who while
Gendl. Here we will make note of the major features of cl-who while
introducing the examples; for complete documentation on cl-who, please
visit the page at Edi Weitz' website listed above.
......@@ -2682,7 +2682,7 @@ Several important concepts are packed into this example. Note the following:
\subsection{A Simple Dynamic Page which Mixes HTML and Common Lisp/GenDL}
\subsection{A Simple Dynamic Page which Mixes HTML and Common Lisp/Gendl}
\label{subsec:asimpledynamicpagewhichmixeshtmlandcommonlisp/gendl}
......@@ -2789,8 +2789,8 @@ Note the following from this example:
The base-html-sheet mixin provides a \texttt{self-link} message for the purpose of generating a hyperlink to that
page. Typically you will have a ``parent'' page object which links to
its ``child'' pages, but GenDL pages can link to other pages anywhere
in the GenDL tree\footnote{In order for dependency-tracking to work
its ``child'' pages, but Gendl pages can link to other pages anywhere
in the Gendl tree\footnote{In order for dependency-tracking to work
properly, the pages must all belong to the same tree, i.e. they must
share a common root object.}.
\begin{figure}
......@@ -2940,7 +2940,7 @@ to Figure
GenDL provides a set of primitives useful for generating
Gendl provides a set of primitives useful for generating
the standard HTML
form-controls@footnote{http://www.w3.org/TR/html401/interact/forms.html}
such as text, checkbox, radio, submit, menu, etc. These
......@@ -2951,6 +2951,41 @@ GenDL provides a set of primitives useful for generating
The form-controls provided by Gendl are documented in YADD accessible with
\begin{verbatim}http://localhost:9000/yadd
\end{verbatim} and in Appendix
\ref{appendix:reference} of this Manual. Examples of
available form-controls are:
\begin{itemize}
\item \texttt{text-form-control}
\item \texttt{checkbox-form-control}
\item \texttt{menu-form-control}
\item \texttt{radio-form-control}
\item \texttt{text-form-control}
\item \texttt{button-form-control}
\end{itemize}
These form-controls are customizable by mixing them into
your own specific form-controls (although this is often not
necessary). New form-controls such as for numbers, dates,
etc are being added to correspond to latest HTML
standards.
\subsubsection{Fillout Forms}
\label{subsubsec:filloutforms}
......@@ -2959,7 +2994,7 @@ GenDL provides a set of primitives useful for generating
A traditional web application must enclose form controls inside a \texttt{form} tag and specify an \texttt{action} (a web URL) to receive and respond to the
form submission. The response will cause the entire page to refresh with
a new page. In GenDL, such a form can be generated by wrapping the layout
a new page. In Gendl, such a form can be generated by wrapping the layout
of the form controls within the \texttt{with-html-form} macro.
......@@ -3065,7 +3100,7 @@ This example, when instantiated in a web browser, might look as shown in Figure
AJAX stands for Asynchronous JavaScript and
\index{AJAX}AJAX stands for Asynchronous JavaScript and
XML \footnote{http://en.wikipedia.org/wiki/Ajax\_(programming)}, and allows for more interactive web applications which
respond to user events by updating only part of the web page. The
``Asynchronous'' in Ajax refers to the ability for a web page to
......@@ -3078,16 +3113,16 @@ returned from an AJAX request.
GenDL contains a simple framework referred to as \emph{gdlAjax} which supports a uniquely convenient and generative
approach to AJAX (and SJAX). With gdlAjax, you use standard GenDL
Gendl contains a simple framework referred to as \emph{gdlAjax} which supports a uniquely convenient and generative
approach to AJAX (and SJAX). With gdlAjax, you use standard Gendl
object definitions and child objects in order to model the web page
and the sections of the page, and the dependency tracking engine which
is built into GenDL automatically keeps track of which sections of the
is built into Gendl automatically keeps track of which sections of the
page need to be updated after a request.
Moreover, the state of the internal GenDL model which represents the
Moreover, the state of the internal Gendl model which represents the
page and the page sections is kept identical to the displayed state of
the page. This means that if the user hits the ``Refresh'' button in
the browser, the state of the page will remain unchanged. This is not
......@@ -3117,7 +3152,7 @@ a standard web application:
mixin. In fact, you can use \texttt{base-ajax-sheet} in standard web applications and you won't notice any difference if you do
everything else the same.
\item Instead of a \texttt{write-html-sheet} message, you specify a \texttt{main-sheet-body} message. The \texttt{main-sheet} can be a computed-slot or GenDL function,
\item Instead of a \texttt{write-html-sheet} message, you specify a \texttt{main-sheet-body} message. The \texttt{main-sheet-body} can be a computed-slot or Gendl function,
and unlike the \texttt{write-html-sheet} message, it should
simply return a string, not send output to a stream. Also, it only
fills in the body of the page --- everything between the <body>
......@@ -3127,7 +3162,7 @@ a standard web application:
\item Any sections of the page which you want to be able
to change themselves in response to an Ajax call must be made
into separate page sections, or ``sheet sections,'' and the HTML
for their \texttt{main-div} included in the main page's \texttt{main-sheet-body}by use of cl-who's \texttt{str} directive.
for their \texttt{main-div} included in the main page's \texttt{main-sheet-body} by use of cl-who's \texttt{str} directive.
\end{enumerate}
......@@ -3232,10 +3267,10 @@ Note the following from the example in Figure
table border, the table padding, and the revenue year to look
up.
\item The only page section in this example is \texttt{(the main-section)}. This is defined as a child object, and has its \texttt{inner-html} computed in the parent and passed in as an input. The \texttt{sheet-section} will automatically compute a \texttt{main-div} message based on the \texttt{inner-html} that we are passing in. The \texttt{main-div} is simply the \texttt{main-view}, wrapped with
\item The only page section in this example is \texttt{(the main-section)}. This is defined as a child object, and has its \texttt{inner-html} computed in the parent and passed in as an input. The \texttt{sheet-section} will automatically compute a \texttt{main-div} message based on the \texttt{inner-html} that we are passing in. The \texttt{main-div} is simply the \texttt{inner-html}, wrapped with
an HTML DIV (i.e. ``division'') tag which contains a unique
identifier for this section, derived from the root-path
to the GenDL object in the in tree which represents the
to the Gendl object in the in tree which represents the
sheet section.
\item We introduce the CL function \texttt{gwl:publish-gwl-app}, which makes available a simplified URL for visiting an instance of this
......@@ -3248,6 +3283,46 @@ Note the following from the example in Figure