From f947c6e37bd13a60fdb7b74d44c4ced2cd55a5df Mon Sep 17 00:00:00 2001 From: David Botton Date: Sun, 31 Oct 2021 10:28:19 -0400 Subject: [PATCH] Add dependicies for 3bmd and colorize --- clog.asd | 5 +++-- doc/clog-manual.html | 34 ++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/clog.asd b/clog.asd index 8b92d28..5818763 100644 --- a/clog.asd +++ b/clog.asd @@ -10,8 +10,9 @@ :serial t :pathname "source/" :depends-on (#:clack #:websocket-driver #:alexandria #:hunchentoot #:cl-ppcre - #:bordeaux-threads #:trivial-open-browser #:parse-float - #:sqlite #:lack-middleware-static #:mgl-pax #:quri) + #:bordeaux-threads #:trivial-open-browser #:parse-float + #:3BMD #:colorize + #:sqlite #:lack-middleware-static #:mgl-pax #:quri) :components ((:file "clog-connection") (:file "clog") (:file "clog-docs") diff --git a/doc/clog-manual.html b/doc/clog-manual.html index 65af836..18b4646 100644 --- a/doc/clog-manual.html +++ b/doc/clog-manual.html @@ -14,7 +14,7 @@ } }); - @@ -86,7 +86,7 @@ connectivity to the browser or other websocket client (often a browser embedded in a native template application.)

STATUS: CLOG is complete enough for most uses. See below for some -enhacements bing worked on, CLOG is actually based on GNOGA, a +enhacements being worked on, CLOG is actually based on GNOGA, a framework I wrote for Ada in 2013 and used in commercial production code for the last 8 years, i.e. the techiniques CLOG uses are solid and proven.

@@ -142,7 +142,8 @@ CL-USER> (clog-user:run-tutorial 1CL-USER> (load "path to clog/demos/01-snake.lisp") CL-USER> (clog-user:start-demo) -

To open a browser with the CLOG manual:

+

To open a browser with the CLOG manual (it is located +at clog/doc/clog-manual.html):

CL-USER> (clog:open-manual)
@@ -204,12 +205,6 @@ tutorials are a good place to start with make CLOG apps in code, so here we are going to demonstrate the concepts using some REPL tricks to help developing CLOG apps in general.

-

Since we already initialized CLOG let's use SET-ON-NEW-WINDOW to change our -on-new-window handler (handler is just a made up name for a function that -will handle an event).

- -
CLOG-USER> (set-on-new-window (lambda (body) (create-div body :content "Hello World!")))
-

(From here on, we will leave out the prompts and responses in our quotes of code.)

@@ -225,6 +220,14 @@ this line and you can watch it happen:

(let ((tmp (create-button *body* :content "Click Me")))
   (set-on-click tmp (lambda (obj)(setf (hiddenp tmp) t))))
+

Since we already initialized CLOG let's use SET-ON-NEW-WINDOW to change our +on-new-window handler (handler is just a made up name for a function that +will handle an event).

+ +
CLOG-USER> (set-on-new-window (lambda (body) (create-div body :content "Hello World!")))
+ +

Now any new window opened will not be using CLOG REPL but instead will execute our handler.

+

Important take aways to using CLOG from the REPL:

    @@ -358,7 +361,8 @@ function. If BOOT-FILE is nil path is removed.

    • [function] OPEN-BROWSER &KEY (URL "http://127.0.0.1:8080")

      -

      Open a web browser to URL.

    • +

      Launch on os a web browser on local machine to URL. See BROWSER-OPEN +for openning windows on remote machines.

    @@ -5786,6 +5790,16 @@ events and messages may not be trasmitted on most browsers.

    Scroll browser window to x y.

    +

    + +
      +
    • [generic-function] OPEN-WINDOW CLOG-WINDOW URL &KEY NAME SPECS REPLACE

      + +

      This will launch a new window of current browser where +CLOG-WINDOW is displayed (remote or local). In modern browsers it is +very limitted to just open a new tab with url unless is a localhost url.

    • +
    +