use character streams instead of binary streams in todo list.

get liveupdater working with native factor.
browser responder now works in native factor.
cvs
Chris Double 2004-08-23 20:22:57 +00:00
parent d99fce030f
commit c22b62215a
3 changed files with 10 additions and 8 deletions

View File

@ -44,6 +44,7 @@ USE: html
USE: parser
USE: errors
USE: unparser
USE: logging
: <browser> ( allow-edit? vocab word -- )
#! An object for storing the current browser
@ -72,7 +73,7 @@ USE: unparser
#! Write out the HTML for the list of words in a vocabulary.
<select name= "words" style= "width: 200" size= "20" onchange= "document.forms.main.submit()" select>
words [
dup "current-word" get [ "" ] unless* str-compare 0 = [
word-name dup "current-word" get [ "" ] unless* str-compare 0 = [
"<option selected>" write
] [
"<option>" write
@ -107,7 +108,7 @@ USE: unparser
: write-vm-statistics ( -- )
#! Display statistics about the JVM in use.
room unparse >r unparse r>
room swap unparse >r unparse r>
<table>
<tr>
<td> "Free Memory" write </td>
@ -148,9 +149,9 @@ USE: unparser
: word-uses ( word -- list )
#! Return a list of vocabularies that the given word uses.
worddef worddef>list flatten [ word? ] subset [
worddef>list flatten [ word? ] subset [
word-vocabulary
] inject ;
] map ;
: vocabulary-uses ( vocab -- list )
#! Return a list of vocabularies that all words in a vocabulary
@ -230,6 +231,6 @@ USE: unparser
: browser-responder ( allow-edit? -- )
#! Start the Smalltalk-like browser.
"browser" "" <browser> browse ;
"browser" f <browser> browse ;
"browser" [ f browser-responder ] install-cont-responder

View File

@ -35,6 +35,7 @@ USE: stack
USE: kernel
USE: cont-utils
USE: cont-responder
USE: prettyprint
: live-search-apropos-word ( string -- )
#! Given a string that is a factor word, show the
@ -59,7 +60,7 @@ USE: cont-responder
<body>
[
[
"millis" [ millis write ] "Display Server millis" live-anchor
"millis" [ millis prettyprint ] "Display Server millis" live-anchor
<div id= "millis" div>
"The millisecond time from the server will appear here" write
</div>

View File

@ -94,7 +94,7 @@ USE: url-encoding
: store-todo ( <todo> filename -- )
#! store the todo list in the given file.
<filebw> [ write-todo ] with-stream ;
<filecw> [ write-todo ] with-stream ;
: read-todo ( -- <todo> )
#! Read a todo list from the current input stream.
@ -109,7 +109,7 @@ USE: url-encoding
] times ;
: load-todo ( filename -- <todo> )
<filebr> [ read-todo ] with-stream ;
<filecr> [ read-todo ] with-stream ;
: password-matches? ( password <todo> -- <todo> )
#! Returns the <todo> if the password matches otherwise