commit c7c5b0fad9be9a7d168bc4df77936697d3756c67
parent 0caa523a9d64b7380f34bdea6820810b4ca2459f
Author: Alexander Burger <abu@software-lab.de>
Date: Mon, 9 May 2011 09:11:28 +0200
More doc fixes
Diffstat:
M | doc/app.html | | | 108 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
1 file changed, 54 insertions(+), 54 deletions(-)
diff --git a/doc/app.html b/doc/app.html
@@ -21,7 +21,7 @@ flexible in layout design, and does not depend on plug-ins, JavaScript or
cookies.
<p>A plain HTTP/HTML GUI has various advantages: It runs on any browser, and can
-be fully driven by scripts ("lib/scrape.l").
+be fully driven by scripts ("@lib/scrape.l").
<p>To be precise: CSS <i>can</i> be used to enhance the layout. And browsers
<i>with</i> JavaScript will respond faster and smoother. But this framework
@@ -140,7 +140,7 @@ directory.
<pre><code>
########################################################################
-(html 0 "Hello" "lib.css" NIL
+(html 0 "Hello" "@lib.css" NIL
"Hello World!" )
########################################################################
</code></pre>
@@ -173,9 +173,9 @@ browser. You should see an empty page with a single line of text.
<h4><a name="how">How does it work?</a></h4>
<p>The above line loads the debugger (via the '+' switch), the HTTP server code
-("lib/http.l"), the XHTML functions ("lib/xhtml.l") and the input form framework
-("lib/form.l", it will be needed later for <a href="#forms">interactive
-forms</a>).
+("@lib/http.l"), the XHTML functions ("@lib/xhtml.l") and the input form
+framework ("@lib/form.l", it will be needed later for <a
+href="#forms">interactive forms</a>).
<p>Then the <code>server</code> function is called with a port number and a
default URL. It will listen on that port for incoming HTTP requests in an
@@ -263,13 +263,13 @@ href="refA.html#allow">allow</a></code> functions
<pre><code>
(allowed ("img/")
- "favicon.ico" "lib.css"
+ "favicon.ico" "@lib.css"
"!start" "customer.l" "article.l")
</code></pre>
<p>This is usually called in the beginning of an application, and allows access
to the directory "img/", to the function 'start', and to the files
-"favicon.ico", "lib.css", "customer.l" and "article.l".
+"favicon.ico", "@lib.css", "customer.l" and "article.l".
<p>Later in the program, <code>*Allow</code> may be dynamically extended with
<code>allow</code>
@@ -292,7 +292,7 @@ line of arbitrary data, to be used as a password for identifying local
resources.
<p>The recommeded way to create this file is to call the <code>pw</code>
-function, defined in "lib/http.l"
+function, defined in "@lib/http.l"
<pre><code>
$ pil @lib/http.l -'pw 12' -bye
@@ -327,7 +327,7 @@ this), and enter the <code>html</code> statement
<pre><code>
$ bin/psh 8080
-: (html 0 "Hello" "lib.css" NIL "Hello World!")
+: (html 0 "Hello" "@lib.css" NIL "Hello World!")
HTTP/1.0 200 OK
Server: PicoLisp
Date: Fri, 29 Dec 2006 07:28:58 GMT
@@ -340,7 +340,7 @@ Content-Type: text/html; charset=utf-8
<head>
<title>Hello</title>
<base href="http://localhost:8080/"/>
-<link rel="stylesheet" href="http://localhost:8080/lib.css" type="text/css"/>
+<link rel="stylesheet" type="text/css" href="http://localhost:8080/@lib.css"/>
</head>
<body>Hello World!</body>
</html>
@@ -358,9 +358,9 @@ Content-Type: text/html; charset=utf-8
<li><code>"Hello"</code>: The page title.
-<li><code>"lib.css"</code>: A CSS-File name. Pass <code>NIL</code> if you do not want
-to use any CSS-File, or a list of file names if you want to give more than one
-CSS-File.
+<li><code>"@lib.css"</code>: A CSS-File name. Pass <code>NIL</code> if you do
+not want to use any CSS-File, or a list of file names if you want to give more
+than one CSS-File.
<li><code>NIL</code>: A CSS style attribute specification (see the description
of <a href="#cssAttr">CSS Attributes</a> below). It will be passed to the
@@ -387,7 +387,7 @@ of print statement).
<pre><code>
########################################################################
-(html 0 "Hello" "lib.css" NIL
+(html 0 "Hello" "@lib.css" NIL
(prinl "Hello World!") )
########################################################################
</code></pre>
@@ -396,7 +396,7 @@ of print statement).
<pre><code>
########################################################################
-(html 0 "Hello" "lib.css" NIL
+(html 0 "Hello" "@lib.css" NIL
(<h1> NIL "Hello World!")
(<br> "This is some text.")
(ht:Prin "And this is a number: " (+ 1 2 3)) )
@@ -445,7 +445,7 @@ attribute's value
<p><hr>
<h3><a name="tags">Tag Functions</a></h3>
-<p>All pre-defined XHTML tag functions can be found in "lib/xhtml.l". We
+<p>All pre-defined XHTML tag functions can be found in "@lib/xhtml.l". We
recommend to look at their sources, and to experiment a bit, by executing them
at a PicoLisp prompt, or by pressing the browser's "Reload" button after editing
the "project.l" file.
@@ -460,7 +460,7 @@ $ bin/psh 8080
:
</code></pre>
-<p>or start the interpreter stand-alone, with "lib/xhtml.l" loaded
+<p>or start the interpreter stand-alone, with "@lib/xhtml.l" loaded
<pre><code>
$ pil @lib/http.l @lib/xhtml.l +
@@ -524,7 +524,7 @@ want to paste the following code into your copy of "project.l":
<pre><code>
########################################################################
-(html 0 "Unordered List" "lib.css" NIL
+(html 0 "Unordered List" "@lib.css" NIL
(<ul> NIL
(<li> NIL "Item 1")
(<li> NIL
@@ -556,7 +556,7 @@ two-dimensional tables with the <code><table></code> and
<pre><code>
########################################################################
-(html 0 "Table" "lib.css" NIL
+(html 0 "Table" "@lib.css" NIL
(<table> NIL NIL NIL
(for N 10 # A table with 10 rows
(<row> NIL N (prin (* N N))) ) ) ) # and 2 columns
@@ -583,7 +583,7 @@ columns, and print each row in an alternating red and blue color
<pre><code>
########################################################################
-(html 0 "Table" "lib.css" NIL
+(html 0 "Table" "@lib.css" NIL
(<table>
'((width . "200px") (style . "border: dotted 1px;")) # table style
"Square Numbers" # caption
@@ -609,7 +609,7 @@ simpler <code><grid></code> function might be convenient:
<pre><code>
########################################################################
-(html 0 "Grid" "lib.css" NIL
+(html 0 "Grid" "@lib.css" NIL
(<grid> 3
"A" "B" "C"
123 456 789 ) )
@@ -647,7 +647,7 @@ functionality:
<pre><code>
########################################################################
-(html 0 "Menu+Tab" "lib.css" NIL
+(html 0 "Menu+Tab" "@lib.css" NIL
(<div> '(id . menu)
(<menu>
("Item" "project.l") # Top level item
@@ -704,13 +704,13 @@ name, followed by arbitrary code (typically HTML tags).
and <code><input></code> elements, using the HTTP POST method to
communicate with the server.
-<p>"lib/xhtml.l" defines a function called <code><post></code>, and a
+<p>"@lib/xhtml.l" defines a function called <code><post></code>, and a
collection of input tag functions, which allow direct programming of HTML forms.
We will supply only one simple example:
<pre><code>
########################################################################
-(html 0 "Simple Form" "lib.css" NIL
+(html 0 "Simple Form" "@lib.css" NIL
(<post> NIL "project.l"
(<field> 10 '*Text)
(<submit> "Save") ) )
@@ -745,7 +745,7 @@ will take effect only when the submit button is pressed.
</ol>
<p>Though we wrote a few applications in that style, we recommend the GUI
-framework provided by "lib/form.l". It does not need any variables for the
+framework provided by "@lib/form.l". It does not need any variables for the
client/server communication, but implements a class hierarchy of GUI components
for the abstraction of application logic, button actions and data linkage.
@@ -765,7 +765,7 @@ somewhere in the application's startup code.
########################################################################
(app) # Start a session
-(html 0 "Simple Session" "lib.css" NIL
+(html 0 "Simple Session" "@lib.css" NIL
(<post> NIL "project.l"
(<field> 10 '*Text)
(<submit> "Save") ) )
@@ -826,7 +826,7 @@ to all other kinds of tag functions - one or more calls to <code>form</code>
(app) # Start session
(action # Action handler
- (html 0 "Form" "lib.css" NIL # HTTP/HTML protocol
+ (html 0 "Form" "@lib.css" NIL # HTTP/HTML protocol
(form NIL # Form
(gui 'a '(+TextField) 10) # Text Field
(gui '(+Button) "Print" # Button
@@ -955,7 +955,7 @@ into the "Source" field, you can copy it in upper or lower case to the
(app)
(action
- (html 0 "Case Conversion" "lib.css" NIL
+ (html 0 "Case Conversion" "@lib.css" NIL
(form NIL
(<grid> 2
"Source" (gui 'src '(+TextField) 30)
@@ -993,7 +993,7 @@ document via the second button
(app)
(action
- (html 0 "Export" "lib.css" NIL
+ (html 0 "Export" "@lib.css" NIL
(form NIL
(gui '(+TextField) 30 8)
(gui '(+Button) "Text"
@@ -1022,7 +1022,7 @@ of the text area (this time we did not bother to give it a name, we simply refer
to it as the form's first gui list element) into that file, and then calls the
<code>url</code> function with the file name.
-<p>The second button uses the PostScript library "lib/ps.l" to create a
+<p>The second button uses the PostScript library "@lib/ps.l" to create a
temporary file "foo.pdf". Here, the temporary file creation and the call to the
<code>url</code> function is hidden in the internal mechanisms of
<code>psOut</code>. The effect is that the browser receives a PDF document and
@@ -1046,7 +1046,7 @@ beginning, it displays a simple form, with a locked text field, and two buttons
(app)
(action
- (html 0 "Alerts and Dialogs" "lib.css" NIL
+ (html 0 "Alerts and Dialogs" "@lib.css" NIL
(form NIL
(gui '(+Init +Lock +TextField) "Initial Text" 20 "My Text")
(gui '(+Button) "Alert"
@@ -1122,7 +1122,7 @@ needed once the calculator is running.
recommended by the <a href="#security">Security</a> chapter)
<pre><code>
-(allowed NIL "!calculator" "favicon.ico" "lib.css")
+(allowed NIL "!calculator" "favicon.ico" "@lib.css")
</code></pre>
<p>at the beginning of "misc/calc.l". This will restrict external access to that
@@ -1209,7 +1209,7 @@ table
(app)
(action
- (html 0 "Table" "lib.css" NIL
+ (html 0 "Table" "@lib.css" NIL
(form NIL
(<table> NIL NIL '((NIL "Text") (NIL "Number"))
(do 4
@@ -1253,7 +1253,7 @@ way to scroll down and make space for more.
(app)
(action
- (html 0 "Chart" "lib.css" NIL
+ (html 0 "Chart" "@lib.css" NIL
(form NIL
(gui '(+Chart) 2) # Inserted a +Chart
(<table> NIL NIL '((NIL "Text") (NIL "Number"))
@@ -1304,7 +1304,7 @@ classes <code>+UpButton</code> and <code>+DnButton</code>
(app)
(action
- (html 0 "Scrollable Chart" "lib.css" NIL
+ (html 0 "Scrollable Chart" "@lib.css" NIL
(form NIL
(gui '(+Chart) 2)
(<table> NIL NIL '((NIL "Text") (NIL "Number"))
@@ -1374,7 +1374,7 @@ of numbers, but expands in the GUI to show also a textual form of each number
(load "@lib/zahlwort.l")
(action
- (html 0 "Numerals" "lib.css" NIL
+ (html 0 "Numerals" "@lib.css" NIL
(form NIL
(gui '(+Init +Chart) (1 5 7) 2
'((N) (list N (zahlwort N)))
@@ -1391,9 +1391,9 @@ of numbers, but expands in the GUI to show also a textual form of each number
########################################################################
</code></pre>
-<p>"lib/zahlwort.l" defines the utility function <code>zahlwort</code>, which is
-required later by the 'put' function. <code>zahlwort</code> accepts a number and
-returns its wording in German.
+<p>"@lib/zahlwort.l" defines the utility function <code>zahlwort</code>, which
+is required later by the 'put' function. <code>zahlwort</code> accepts a number
+and returns its wording in German.
<p>Now look at the code
@@ -1512,14 +1512,14 @@ Inspecting <code>+DnButton</code> directly
<p>shows that <code>+DnButton</code> inherits from <code>+Tiny</code>,
<code>+Rid</code>, <code>+Able</code> and <code>+Button</code>. The actual
-definition of <code>+DnButton</code> can be found in "lib/form.l"
+definition of <code>+DnButton</code> can be found in "@lib/form.l"
<pre><code>
(class +DnButton +Tiny +Rid +JS +Able +Button)
...
</code></pre>
-<p>In general, "lib/form.l" is the ultimate reference to the framework, and
+<p>In general, "@lib/form.l" is the ultimate reference to the framework, and
should be freely consulted.
@@ -1602,7 +1602,7 @@ current locale.
(app)
(action
- (html 0 "+NumField" "lib.css" NIL
+ (html 0 "+NumField" "@lib.css" NIL
(form NIL
(gui '(+NumField) 10)
(gui '(+JS +Button) "Print value"
@@ -1622,7 +1622,7 @@ accepts/returns scaled fixpoint numbers.
(app)
(action
- (html 0 "+FixField" "lib.css" NIL
+ (html 0 "+FixField" "@lib.css" NIL
(form NIL
(gui '(+FixField) 3 10)
(gui '(+JS +Button) "Print value"
@@ -1643,7 +1643,7 @@ href="refD.html#date">date</a></code> value.
(app)
(action
- (html 0 "+DateField" "lib.css" NIL
+ (html 0 "+DateField" "@lib.css" NIL
(form NIL
(gui '(+DateField) 10)
(gui '(+JS +Button) "Print value"
@@ -1691,7 +1691,7 @@ href="refT.html#time">time</a></code> value.
(app)
(action
- (html 0 "+TimeField" "lib.css" NIL
+ (html 0 "+TimeField" "@lib.css" NIL
(form NIL
(gui '(+TimeField) 8)
(gui '(+JS +Button) "Print value"
@@ -1736,7 +1736,7 @@ single leading zero is replaced with the current locale's country code (see
(locale "DE" "de")
(action
- (html 0 "+TelField" "lib.css" NIL
+ (html 0 "+TelField" "@lib.css" NIL
(form NIL
(gui '(+TelField) 20)
(gui '(+JS +Button) "Print value"
@@ -1758,7 +1758,7 @@ non-<code>NIL</code>) values, and returns <code>T</code> or <code>NIL</code>.
(app)
(action
- (html 0 "+Checkbox" "lib.css" NIL
+ (html 0 "+Checkbox" "@lib.css" NIL
(form NIL
(gui '(+Checkbox))
(gui '(+JS +Button) "Print value"
@@ -1921,7 +1921,7 @@ or 3 internally
(app)
(action
- (html 0 "+Map" "lib.css" NIL
+ (html 0 "+Map" "@lib.css" NIL
(form NIL
(gui '(+Map +TextField)
'(("One" . 1) ("Two" . 2) ("Three" . 3))
@@ -1951,7 +1951,7 @@ print updated values to standard error
(default *Number 0)
(action
- (html 0 "+Upd" "lib.css" NIL
+ (html 0 "+Upd" "@lib.css" NIL
(form NIL
(gui '(+Upd +Var +NumField)
'(prog (extra) (msg *Number))
@@ -1984,7 +1984,7 @@ error string when the current value is greater than 9.
(app)
(action
- (html 0 "+Chk" "lib.css" NIL
+ (html 0 "+Chk" "@lib.css" NIL
(form NIL
(gui '(+Chk +NumField)
'(or
@@ -2006,7 +2006,7 @@ allowed into the field.
(app)
(action
- (html 0 "+Limit" "lib.css" NIL
+ (html 0 "+Limit" "@lib.css" NIL
(form NIL
(gui '(+Limit +TextField) 4 8)
(gui '(+JS +Button) "Print"
@@ -2036,7 +2036,7 @@ its current value.
(setq *TextVariable "abc")
(action
- (html 0 "+Var" "lib.css" NIL
+ (html 0 "+Var" "@lib.css" NIL
(form NIL
(gui '(+Var +TextField) '*TextVariable 8)
(gui '(+JS +Button) "Print"
@@ -2064,7 +2064,7 @@ global variable <code>*Obj</code>.
(new! '(+Tst) 'nr 1 'nm "New Object") ) )
(action
- (html 0 "+E/R" "lib.css" NIL
+ (html 0 "+E/R" "@lib.css" NIL
(form NIL
(gui '(+E/R +NumField) '(nr . *Obj) 8) # Linkage to 'nr'
(gui '(+E/R +TextField) '(nm . *Obj) 20) # Linkage to 'nm'
@@ -2367,7 +2367,7 @@ authentication and authorization.
</ul>
<p>The classes <code>+Role</code> and <code>+User</code> are defined in
-"lib/adm.l". A <code>+Role</code> has a name, a list of permissions, and a list
+"@lib/adm.l". A <code>+Role</code> has a name, a list of permissions, and a list
of users assigned to this role. A <code>+User</code> has a name, a password and
a role.