mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Remove use of package local nicknames
This commit is contained in:
parent
0c5408f281
commit
8eb1bd753e
9 changed files with 32 additions and 32 deletions
|
|
@ -81,7 +81,7 @@ during attachment. (Private)"))
|
|||
(:documentation "Execure SCRIPT on browser. (Internal)"))
|
||||
|
||||
(defmethod js-execute ((obj clog-obj) script)
|
||||
(cc:execute (connection-id obj) script))
|
||||
(clog-connection:execute (connection-id obj) script))
|
||||
|
||||
;;;;;;;;;;;;;;
|
||||
;; js-query ;;
|
||||
|
|
@ -91,7 +91,7 @@ during attachment. (Private)"))
|
|||
(:documentation "Execure SCRIPT on browser and return result. (Internal)"))
|
||||
|
||||
(defmethod js-query ((obj clog-obj) script &key (default-answer nil))
|
||||
(cc:query (connection-id obj) script :default-answer default-answer))
|
||||
(clog-connection:query (connection-id obj) script :default-answer default-answer))
|
||||
|
||||
;;;;;;;;;;;;
|
||||
;; jquery ;;
|
||||
|
|
@ -414,7 +414,7 @@ result or if time out DEFAULT-ANSWER (Private)"))
|
|||
(:documentation "Returns true if connection is valid on this CLOG-OBJ."))
|
||||
|
||||
(defmethod validp ((obj clog-obj))
|
||||
(cc:validp (connection-id obj)))
|
||||
(clog-connection:validp (connection-id obj)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;
|
||||
;; connection-data ;;
|
||||
|
|
@ -429,7 +429,7 @@ for internal use of clog. The key \"clog-body\" is set to the
|
|||
clog-body of this connection."))
|
||||
|
||||
(defmethod connection-data ((obj clog-obj))
|
||||
(cc:get-connection-data (connection-id obj)))
|
||||
(clog-connection:get-connection-data (connection-id obj)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; connection-data-item ;;
|
||||
|
|
|
|||
|
|
@ -44,8 +44,8 @@
|
|||
|
||||
|
||||
(defmethod create-context2d ((obj clog-canvas))
|
||||
(let ((web-id (cc:generate-id)))
|
||||
(cc:execute (connection-id obj)
|
||||
(let ((web-id (clog-connection:generate-id)))
|
||||
(clog-connection:execute (connection-id obj)
|
||||
(format nil "clog['~A']=clog['~A'].getContext('2d')"
|
||||
web-id
|
||||
(html-id obj)))
|
||||
|
|
|
|||
|
|
@ -122,7 +122,8 @@ clog-document object. (Private)"))
|
|||
(defgeneric set-title (clog-document value))
|
||||
|
||||
(defmethod set-title ((obj clog-document) value)
|
||||
(execute obj (format nil "title='~A'" (cc:escape-string value))))
|
||||
(execute obj
|
||||
(format nil "title='~A'" (clog-connection:escape-string value))))
|
||||
(defsetf title set-title)
|
||||
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ clog[] but is not in the DOM. If HTML-ID is nil one is generated.
|
|||
(private)"
|
||||
(let ((web-id (if html-id
|
||||
html-id
|
||||
(cc:generate-id))))
|
||||
(cc:execute
|
||||
(clog-connection:generate-id))))
|
||||
(clog-connection:execute
|
||||
connection-id
|
||||
(format nil
|
||||
"clog['~A']=$(\"~A\").get(0); $(clog['~A']).first().prop('id','~A')"
|
||||
|
|
@ -55,7 +55,7 @@ clog[] but is not in the DOM. If HTML-ID is nil one is generated.
|
|||
(defun attach (connection-id html-id)
|
||||
"Create a new clog-obj and attach an existing element with HTML-ID on
|
||||
CONNECTION-ID to it and then return it. The HTML-ID must be unique. (private)"
|
||||
(cc:execute connection-id
|
||||
(clog-connection:execute connection-id
|
||||
(format nil "clog['~A']=$('#~A').get(0)" html-id html-id))
|
||||
(make-clog-element connection-id html-id))
|
||||
|
||||
|
|
@ -93,7 +93,7 @@ must be in DOM, ie placed or auto-placed."))
|
|||
|
||||
(defmethod attach-as-child ((obj clog-obj) html-id
|
||||
&key (clog-type 'clog-element))
|
||||
(cc:execute (connection-id obj)
|
||||
(clog-connection:execute (connection-id obj)
|
||||
(format nil "clog['~A']=$('#~A').get(0)" html-id html-id))
|
||||
(make-clog-element (connection-id obj) html-id :clog-type clog-type))
|
||||
|
||||
|
|
|
|||
|
|
@ -17,14 +17,14 @@
|
|||
|
||||
(defmethod form-get-data (clog-obj)
|
||||
(quri:uri-query-params
|
||||
(quri:uri (cc:query (connection-id clog-obj) "location.href"))))
|
||||
(quri:uri (clog-connection:query (connection-id clog-obj) "location.href"))))
|
||||
|
||||
(defgeneric form-post-data (clog-obj)
|
||||
(:documentation "Get the form data as an a-list sent by post method"))
|
||||
|
||||
(defmethod form-post-data (clog-obj)
|
||||
(quri:url-decode-params
|
||||
(cc:query (connection-id clog-obj) "clog['post-data']")))
|
||||
(clog-connection:query (connection-id clog-obj) "clog['post-data']")))
|
||||
|
||||
(defun form-data-item (form-data item)
|
||||
"Return value for ITEM from FROM-DATA a-list"
|
||||
|
|
@ -379,7 +379,7 @@ have this set true. Autofocus on element when form loaded. "))
|
|||
group called NAME."))
|
||||
|
||||
(defmethod radio-value ((obj clog-obj) name)
|
||||
(cc:query (connection-id obj)
|
||||
(clog-connection:query (connection-id obj)
|
||||
(format nil "$('input:radio[name=~A]:checked').val()"
|
||||
name)))
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ group called NAME."))
|
|||
(:documentation "Returns t or nil on the selected checkbox button."))
|
||||
|
||||
(defmethod checkbox-value ((obj clog-obj) name)
|
||||
(js-on-p (cc:query (connection-id obj)
|
||||
(js-on-p (clog-connection:query (connection-id obj)
|
||||
(format nil "$('input:checkbox[name=~A]:checked').val()"
|
||||
name))))
|
||||
|
||||
|
|
@ -404,7 +404,7 @@ group called NAME."))
|
|||
be unique name on entire document."))
|
||||
|
||||
(defmethod select-value ((obj clog-obj) name)
|
||||
(cc:query (connection-id obj)
|
||||
(clog-connection:query (connection-id obj)
|
||||
(format nil "$('select[name=~A] option:selected').val()" name)))
|
||||
|
||||
;;;;;;;;;;;;;;;;
|
||||
|
|
@ -416,7 +416,7 @@ be unique name on entire document."))
|
|||
be unique name on entire document."))
|
||||
|
||||
(defmethod name-value ((obj clog-obj) name)
|
||||
(cc:query (connection-id obj)
|
||||
(clog-connection:query (connection-id obj)
|
||||
(format nil "$('input[name=~A]').val()" name)))
|
||||
|
||||
;;;;;;;;;;;;;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ clog-user:*body* to last window openned to /repl."
|
|||
(unless *clog-running*
|
||||
(initialize nil :boot-file "/debug.html"))
|
||||
(set-on-new-window (lambda (body)
|
||||
(cc:debug-mode (connection-id body))
|
||||
(clog-connection:debug-mode (connection-id body))
|
||||
(setf clog-user::*body* body))
|
||||
:path "/repl")
|
||||
(open-browser :url "http://127.0.0.1:8080/repl")
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ the same as the clog directy this overides the relative paths used in them.")
|
|||
;;;;;;;;;;;;;;;;
|
||||
|
||||
(defun on-connect (connection-id)
|
||||
(when cc:*verbose-output*
|
||||
(when clog-connection:*verbose-output*
|
||||
(format t "Start new window handler on connection-id - ~A" connection-id))
|
||||
(let ((body (make-clog-body connection-id)))
|
||||
(let* ((path (path-name (location body)))
|
||||
|
|
@ -63,14 +63,14 @@ compiled version."
|
|||
(set-on-new-window on-new-window-handler :path "/" :boot-file boot-file)
|
||||
(unless *clog-running*
|
||||
(setf *clog-running* t)
|
||||
(cc:initialize #'on-connect
|
||||
:host host
|
||||
:port port
|
||||
:boot-file boot-file
|
||||
:static-boot-js static-boot-js
|
||||
:static-root (if *overide-static-root*
|
||||
*overide-static-root*
|
||||
static-root))))
|
||||
(clog-connection:initialize #'on-connect
|
||||
:host host
|
||||
:port port
|
||||
:boot-file boot-file
|
||||
:static-boot-js static-boot-js
|
||||
:static-root (if *overide-static-root*
|
||||
*overide-static-root*
|
||||
static-root))))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; set-on-new-window ;;
|
||||
|
|
@ -83,7 +83,7 @@ using BOOT_FILE. Paths should always begin with a '/'. If PATH is set to
|
|||
\"default\" will use boot-file when the route can not be determined, ie
|
||||
a static html file including boot.js that has not been added with this
|
||||
function. If BOOT-FILE is nil path is removed."
|
||||
(cc:set-clog-path path boot-file)
|
||||
(clog-connection:set-clog-path path boot-file)
|
||||
(if boot-file
|
||||
(setf (gethash path *url-to-on-new-window*) on-new-window-handler)
|
||||
(remhash path *url-to-on-new-window*)))
|
||||
|
|
@ -96,7 +96,7 @@ function. If BOOT-FILE is nil path is removed."
|
|||
"Shutdown CLOG."
|
||||
(clrhash *url-to-on-new-window*)
|
||||
(setf *clog-running* nil)
|
||||
(cc:shutdown-clog))
|
||||
(clog-connection:shutdown-clog))
|
||||
|
||||
;;;;;;;;;;;;;;;;
|
||||
;; debug-mode ;;
|
||||
|
|
@ -104,7 +104,7 @@ function. If BOOT-FILE is nil path is removed."
|
|||
|
||||
(defun debug-mode (obj)
|
||||
"Turn on browser console debugging for OBJ's connection."
|
||||
(cc:debug-mode (connection-id obj)))
|
||||
(clog-connection:debug-mode (connection-id obj)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
;; open-browser ;;
|
||||
|
|
|
|||
|
|
@ -401,7 +401,7 @@ very limitted to just open a new tab with url unless is a localhost url."))
|
|||
(:documentation "Close connection to browser with out closing browser."))
|
||||
|
||||
(defmethod close-connection ((obj clog-window))
|
||||
(cc:cclose (connection-id obj)))
|
||||
(clog-connection:cclose (connection-id obj)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;
|
||||
;; set-on-abort ;;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
(mgl-pax:define-package :clog
|
||||
(:documentation "The Common List Omnificent GUI - CLOG")
|
||||
(:local-nicknames (:cc :clog-connection))
|
||||
(:use #:cl #:parse-float #:mgl-pax))
|
||||
|
||||
(cl:in-package :clog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue