From f947c6e37bd13a60fdb7b74d44c4ced2cd55a5df Mon Sep 17 00:00:00 2001
From: David Botton
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.
CL-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:
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.
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.