]> gitweb.factorcode.org Git - factor.git/commitdiff
Changes to cont-responder to work with recent Factor changes
authorChris Double <chris.double@double.co.nz>
Mon, 7 Feb 2005 00:08:14 +0000 (00:08 +0000)
committerChris Double <chris.double@double.co.nz>
Mon, 7 Feb 2005 00:08:14 +0000 (00:08 +0000)
(string-output instead of string-output-stream, new cons format, etc).

contrib/cont-responder/browser.factor
contrib/cont-responder/cont-responder.factor
contrib/cont-responder/eval-responder.factor
contrib/cont-responder/live-updater.factor
contrib/cont-responder/todo.factor
contrib/cont-responder/tutorial.txt

index c0525142b1511d924cce71f44478a63f124312c7..db7c92df5dbafcc028921668ebebf58f9eb35992 100644 (file)
@@ -86,7 +86,7 @@ USE: listener
 : write-editable-word-source ( vocab word -- )
   #! Write the source in a manner allowing it to be edited.
   <textarea name= "eval" rows= "30" cols= "80" textarea> 
-    1024 <string-output-stream> dup >r [
+    1024 <string-output> dup >r [
       >r words r> swap [ over swap dup word-name rot = [ see ] [ drop ] ifte ] each drop    
     ] with-stream r> stream>str chars>entities write
   </textarea> <br/>
@@ -224,3 +224,4 @@ USE: listener
   "browser" f <browser> browse ;
 
 "browser" [ f browser-responder ] install-cont-responder
+!"browser-edit" [ t browser-responder ] install-cont-responder
index a8f01639281cdccf180bb112f185c0edf1765bc7..410123a47dceb8d0a43bc50c4070b9294c32d8a9 100644 (file)
@@ -193,7 +193,7 @@ DEFER: show
 : with-string-stream ( quot -- string ) 
   #! Call the quotation with standard output bound to a string output
   #! stream. Return the string on exit.
-  1024 <string-output-stream> dup >r swap with-stream r> stream>str ;
+  1024 <string-output> dup >r swap with-stream r> stream>str ;
 
 : redirect-to-here ( -- )
   #! Force a redirect to the client browser so that the browser
index 41e9651aad5447861286ef2eb14af4ddd74dc0e2..b769f95779b285b8d8fb34c53121a15689ce7fc6 100644 (file)
@@ -73,7 +73,7 @@ USE: logging
 : escape-quotes ( string -- string )
   #! Replace occurrences of single quotes with
   #! backslash quote.
-  [ dup [ [ CHAR: ' | "\\'" ] [ CHAR: " | "\\\"" ] ] assoc dup rot ? ] str-map ;
+  [ dup [ [[ CHAR: ' "\\'" ]] [[ CHAR: " "\\\"" ]] ] assoc dup rot ? ] str-map ;
  
 : make-eval-javascript ( string -- string )
   #! Give a string return some javascript that when
@@ -187,7 +187,7 @@ USE: logging
   #! callstack along with the resulting datastack as a list.
   <namespace> [ 
     "inspect" "responder" set
-    1024 <string-output-stream> dup >r <html-stream> [
+    1024 <string-output> dup >r <html-stream> [
       do-eval 
     ] with-stream r> stream>str 
   ] bind ;
index ec385995821a52c9e5539645dda7d1dc9d19e410..40a36c9bd6277b4a10e62feef6cb24ba1fd50ea6 100644 (file)
@@ -39,7 +39,7 @@ USE: lists
 
 : get-live-updater-js ( filename -- string )
   #! Return the liveUpdater javascript code as a string.
-  <filecr> [ get-live-updater-js* ] make-string ;
+  <file-reader> [ get-live-updater-js* ] make-string ;
 
 : live-updater-url ( -- url )
   #! Generate an URL to the liveUpdater.js code.
index a773320a350f10d3d8c0a0f35b1f89e070583fee..063cadc9752480db09c7e1584a5270b454e9ae1c 100644 (file)
@@ -91,7 +91,7 @@ USE: hashtables
 
 : store-todo ( <todo> filename -- )
   #! store the todo list in the given file.
-  <filecw> [ write-todo ] with-stream ;
+  <file-writer> [ write-todo ] with-stream ;
 
 : read-todo ( -- <todo> )
   #! Read a todo list from the current input stream.
@@ -106,7 +106,7 @@ USE: hashtables
   ] times ;
 
 : load-todo ( filename -- <todo> )
-  <filecr> [ read-todo ] with-stream ;  
+  <file-reader> [ read-todo ] with-stream ;  
 
 : password-matches? ( password <todo> -- <todo> )
   #! Returns the <todo> if the password matches otherwise
index dae16542f708fe7ffaee7032bf0a6a448cadfa54..7373c464b01296b114a0072f351c1f5a820c0f1d 100644 (file)
@@ -152,7 +152,7 @@ Dynamic Data
 ============
 
 Adding dynamic data to the page is relatively easy. This example pulls
-information from the 'room' word which displays memory details about
+information from the 'room' word which displays memory details about
 the running Factor system. It also uses 'room.' which outputs these
 details to standard output and this is wrapped in a <pre> tag so it is
 formatted correctly.